File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ def install_requirements(use_pytorch_nightly):
123123 # This is usually not recommended.
124124 new_env = os .environ .copy ()
125125 new_env ["USE_CPP" ] = "1" # install torchao kernels
126+ # Set a flag to override the compatiblity error caused by CMake 4.0.0+ dropping support for
127+ # things like `cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)`
128+ new_env ["CMAKE_POLICY_VERSION_MINIMUM" ] = "3.5"
126129 subprocess .run (
127130 [
128131 sys .executable ,
Original file line number Diff line number Diff line change @@ -703,14 +703,15 @@ def run(self):
703703 # like `TorchConfig.cmake` that are provided by pip packages.
704704 f"-DCMAKE_PREFIX_PATH={ cmake_prefix_path } " ,
705705 f"-DCMAKE_BUILD_TYPE={ cfg } " ,
706- # A temporary flag for overriding exception caused by CMake 4.0.0+
707- "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" ,
708706 # Enable logging even when in release mode. We are building for
709707 # desktop, where saving a few kB is less important than showing
710708 # useful error information to users.
711709 "-DEXECUTORCH_ENABLE_LOGGING=ON" ,
712710 "-DEXECUTORCH_LOG_LEVEL=Info" ,
713711 "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15" ,
712+ # Set a flag to override the compatiblity error caused by CMake 4.0.0+ dropping support for
713+ # things like `cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)`
714+ "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" ,
714715 # The separate host project is only required when cross-compiling,
715716 # and it can cause build race conditions (libflatcc.a errors) when
716717 # enabled. TODO(dbort): Remove this override once this option is
You can’t perform that action at this time.
0 commit comments