Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak CI job failures caused by cmake upgrade #9730

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ include(tools/cmake/Utils.cmake)
include(CMakeDependentOption)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Set a flag to override the compatiblity error caused by CMake 4.0.0+ dropping support for
# things like `cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)`
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
Expand Down
3 changes: 3 additions & 0 deletions install_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def install_requirements(use_pytorch_nightly):
# This is usually not recommended.
new_env = os.environ.copy()
new_env["USE_CPP"] = "1" # install torchao kernels
# Set a flag to override the compatiblity error caused by CMake 4.0.0+ dropping support for
# things like `cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)`
new_env["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5"
subprocess.run(
[
sys.executable,
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ def run(self):
"-DEXECUTORCH_ENABLE_LOGGING=ON",
"-DEXECUTORCH_LOG_LEVEL=Info",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15",
# Set a flag to override the compatiblity error caused by CMake 4.0.0+ dropping support for
# things like `cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)`
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
# The separate host project is only required when cross-compiling,
# and it can cause build race conditions (libflatcc.a errors) when
# enabled. TODO(dbort): Remove this override once this option is
Expand Down
Loading