Skip to content

Commit 79423d0

Browse files
committed
Update
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 9639206 commit 79423d0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

install_requirements.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)