Skip to content

Commit dcab8e3

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

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>=78.1.0", "cmake>=3.18", "ninja>=1.11.1", "pybind11>=2.13.1"]
2+
requires = ["setuptools>=78.1.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>=78.1.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
@@ -415,8 +415,8 @@ def run(self):
415415

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

421421
for ext in self.extensions:
422422
self.build_extension(ext)
@@ -832,7 +832,7 @@ def get_git_version_suffix():
832832
test_suite="tests",
833833
extras_require={
834834
"build": [
835-
"cmake>=3.20",
835+
"cmake>=3.20,<4.0",
836836
"lit",
837837
],
838838
"tests": [

0 commit comments

Comments
 (0)