Skip to content

Commit 1cbcf9f

Browse files
authored
Limit supported cmake versions to be the same everywhere (#6903)
For consistency --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 7ff2b0b commit 1cbcf9f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18)
1+
cmake_minimum_required(VERSION 3.20)
22

33
if(POLICY CMP0116)
44
# Introduced in cmake 3.20

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=40.8.0", "cmake>=3.18", "ninja>=1.11.1", "pybind11>=2.13.1"]
2+
requires = ["setuptools>=40.8.0", "cmake>=3.20,<4.0", "ninja>=1.11.1", "pybind11>=2.13.1"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.mypy]

python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setuptools>=40.8.0
22
wheel
3-
cmake>=3.18,<4.0
3+
cmake>=3.20,<4.0
44
ninja>=1.11.1
55
pybind11>=2.13.1
66
lit

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ def run(self):
401401

402402
match = re.search(r"version\s*(?P<major>\d+)\.(?P<minor>\d+)([\d.]+)?", out.decode())
403403
cmake_major, cmake_minor = int(match.group("major")), int(match.group("minor"))
404-
if (cmake_major, cmake_minor) < (3, 18):
405-
raise RuntimeError("CMake >= 3.18.0 is required")
404+
if (cmake_major, cmake_minor) < (3, 20):
405+
raise RuntimeError("CMake >= 3.20 is required")
406406

407407
for ext in self.extensions:
408408
self.build_extension(ext)
@@ -813,7 +813,7 @@ def get_git_version_suffix():
813813
test_suite="tests",
814814
extras_require={
815815
"build": [
816-
"cmake>=3.20",
816+
"cmake>=3.20,<4.0",
817817
"lit",
818818
],
819819
"tests": [

0 commit comments

Comments
 (0)