Use 3.27 as the minimum CMake version (#153153)

Update the minimum CMake version to 3.27 because of it provides more CUDA targets such as `CUDA::nvperf_host` so that it is possible to remove some of our forked CUDA modules. See https://github.com/pytorch/pytorch/pull/153783.
It's also possible to facilitate future third-party updates such as FBGEMM (its current shipped version requires 3.21).

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153153
Approved by: https://github.com/malfet
This commit is contained in:
cyy
2025-05-30 11:25:26 +00:00
committed by PyTorch MergeBot
parent 9d6f0d5991
commit 1ece53b157
13 changed files with 56 additions and 21 deletions

View File

@ -1729,7 +1729,7 @@ class CppBuilder:
definitions = " ".join(self._build_option.get_definitions())
contents = textwrap.dedent(
f"""
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
cmake_minimum_required(VERSION 3.27 FATAL_ERROR)
project(aoti_model LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)