From 87549a65c96cd7e48f024c02e7daa3f227b2bf18 Mon Sep 17 00:00:00 2001 From: Catherine Lee Date: Fri, 28 Mar 2025 20:55:01 +0000 Subject: [PATCH] [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 --- .ci/docker/common/install_executorch.sh | 3 ++- .ci/docker/common/install_halide.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.ci/docker/common/install_executorch.sh b/.ci/docker/common/install_executorch.sh index a9a558b86f9..81e291ba0ab 100755 --- a/.ci/docker/common/install_executorch.sh +++ b/.ci/docker/common/install_executorch.sh @@ -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 diff --git a/.ci/docker/common/install_halide.sh b/.ci/docker/common/install_halide.sh index 0cfcfbce107..21764583849 100644 --- a/.ci/docker/common/install_halide.sh +++ b/.ci/docker/common/install_halide.sh @@ -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" \