[CI] Fix docker builds failing due to cmake update by setting CMAKE_POLICY_VERSION_MINIMUM (#150220)

Set the CMAKE_POLICY_VERSION_MINIMUM env var to make executorch and halide docker builds pass (they install from those repos which don't have cmake pinned)

This can be removed if executorch and halide update their builds and we update the hash?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150220
Approved by: https://github.com/atalman, https://github.com/malfet
This commit is contained in:
Catherine Lee 2025-03-28 20:55:01 +00:00 committed by PyTorch MergeBot
parent cb83850a24
commit 87549a65c9
2 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,8 @@ install_conda_dependencies() {
install_pip_dependencies() {
pushd executorch
as_jenkins bash install_executorch.sh
# Remove CMAKE_POLICY_VERSION_MINIMUM when cmake 4.0.0 is more supported
as_jenkins CMAKE_POLICY_VERSION_MINIMUM=3.5 bash install_executorch.sh
# A workaround, ExecuTorch has moved to numpy 2.0 which is not compatible with the current
# numba and scipy version used in PyTorch CI

View File

@ -19,6 +19,9 @@ fi
conda_install numpy scipy imageio cmake ninja
# Remove this when cmake 4.0.0 is more supported
export CMAKE_POLICY_VERSION_MINIMUM=3.5
git clone --depth 1 --branch release/16.x --recursive https://github.com/llvm/llvm-project.git
cmake -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang" \