Revert "Use 3.27 as the minimum CMake version (#153153)"

This reverts commit ad26ec6abe51d528124bc5fbbacaa87aef077ab8.

Reverted https://github.com/pytorch/pytorch/pull/153153 on behalf of https://github.com/cyyever due to It still breaks windows debug builds ([comment](https://github.com/pytorch/pytorch/pull/153153#issuecomment-2923997777))
This commit is contained in:
PyTorch MergeBot
2025-05-31 02:14:24 +00:00
parent 43390d8b13
commit bd10ea4e6c
14 changed files with 27 additions and 65 deletions

View File

@ -60,15 +60,12 @@ class CMake:
cmake3_version = CMake._get_version(which("cmake3"))
cmake_version = CMake._get_version(which("cmake"))
_cmake_min_version = LooseVersion("3.27.0")
_cmake_min_version = LooseVersion("3.18.0")
if all(
ver is None or ver < _cmake_min_version
for ver in [cmake_version, cmake3_version]
):
raise RuntimeError(
"no cmake or cmake3 with version >= 3.27.0 found:"
+ str([cmake_version, cmake3_version])
)
raise RuntimeError("no cmake or cmake3 with version >= 3.18.0 found")
if cmake3_version is None:
cmake_command = "cmake"