Skip to content

Commit e057480

Browse files
[Bot] Update to CMake 4.1.0 (#626)
* [Bot] Update to CMake 4.1.0 * fix: don't test 64-bit time when not available * fix: skip CompilerId tests on manylinux_2_31_armv7l Architecture ID is not detected properly for gfortran on Ubuntu 20.04 armhf --------- Co-authored-by: scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com> Co-authored-by: mayeut <mayeut@users.noreply.github.com>
1 parent eb664aa commit e057480

File tree

8 files changed

+55
-30
lines changed

8 files changed

+55
-30
lines changed

CMakeLists.txt

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,11 @@ if(CMakePythonDistributions_SUPERBUILD)
189189
#
190190
if(NOT DEFINED CMakeProject_BINARY_DIR)
191191

192-
# glibc check
192+
# cmake cache arguments
193+
set(_cmake_cache_args)
194+
193195
if(UNIX AND NOT APPLE)
196+
# glibc check
194197
# as of CMake 3.23.0, the minimum supported version of libuv is 1.28.0.
195198
# this implies that the minimum supported glibc version is 2.12
196199
# https://github.com/libuv/libuv/blob/v1.x/SUPPORTED_PLATFORMS.md
@@ -206,10 +209,25 @@ if(CMakePythonDistributions_SUPERBUILD)
206209
message(FATAL_ERROR "GLIBC ${GLIBC_MAJOR}.${GLIBC_MINOR} not supported")
207210
endif()
208211
endif()
212+
213+
# Y2K38 support
214+
include(CMakePushCheckState)
215+
cmake_push_check_state(RESET)
216+
set(CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64)
217+
set(CMAKE_EXTRA_INCLUDE_FILES "time.h")
218+
include(CheckTypeSize)
219+
check_type_size(time_t SIZEOF_TIME_T LANGUAGE CXX)
220+
cmake_pop_check_state()
221+
if(HAVE_SIZEOF_TIME_T)
222+
if(SIZEOF_TIME_T LESS 8)
223+
list(APPEND _cmake_cache_args
224+
-DCMake_TEST_NO_64BIT_TIME:BOOL=TRUE
225+
)
226+
message(STATUS "SuperBuild - CMakeProject-build - 64-bit time tests disabled")
227+
endif()
228+
endif()
209229
endif()
210230

211-
# cmake cache arguments
212-
set(_cmake_cache_args)
213231
if(DEFINED CMAKE_BUILD_TYPE)
214232
list(APPEND _cmake_cache_args
215233
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}

CMakeUrls.cmake

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11

22
#-----------------------------------------------------------------------------
33
# CMake sources
4-
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3.tar.gz")
5-
set(unix_source_sha256 "8d3537b7b7732660ea247398f166be892fe6131d63cc291944b45b91279f3ffb")
4+
set(unix_source_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0.tar.gz")
5+
set(unix_source_sha256 "81ee8170028865581a8e10eaf055afb620fa4baa0beb6387241241a975033508")
66

7-
set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3.zip")
8-
set(windows_source_sha256 "398c49dfe07aa9bfce0f9c0ab29d1492046b9ea8ed28a54e298fc35ca63e0b65")
7+
set(windows_source_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0.zip")
8+
set(windows_source_sha256 "6b64d0aae3af85b775ee5a584b6f4083c1568f46afa266beec430a5a65eb21a6")
99

1010
#-----------------------------------------------------------------------------
1111
# CMake binaries
1212

1313
set(linux32_binary_url "NA") # Linux 32-bit binaries not available
1414
set(linux32_binary_sha256 "NA")
1515

16-
set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-linux-x86_64.tar.gz")
17-
set(linux64_binary_sha256 "585ae9e013107bc8e7c7c9ce872cbdcbdff569e675b07ef57aacfb88c886faac")
16+
set(linux64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0-linux-x86_64.tar.gz")
17+
set(linux64_binary_sha256 "2637dab096e65c7d011ca0504fc0c563f8ffb531919754156ddec4b7a2f8584d")
1818

19-
set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-macos10.10-universal.tar.gz")
20-
set(macos10_10_binary_sha256 "31f1d30f47ce1ac25168a70635c2a9160a1a7b54b28f7efac8e8d3c9154add45")
19+
set(macos10_10_binary_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0-macos10.10-universal.tar.gz")
20+
set(macos10_10_binary_sha256 "405b6860e7a1f8a1438b49c432739bc9c6c42634d6a06fbc722705b2f34d3b02")
2121

22-
set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-i386.zip")
23-
set(win32_binary_sha256 "9f71df30cf0194f7214d135afb277017bd4a58baba2ae14e6ae8b0533b5a3dbf")
22+
set(win32_binary_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0-windows-i386.zip")
23+
set(win32_binary_sha256 "8f204250a3df83fa2e46cceae9e4077ba3032cf3b36f86ea5c97485cecc51f4d")
2424

25-
set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-x86_64.zip")
26-
set(win64_binary_sha256 "b59a31dfbfa376a4aaea9ff560ff2b29f78ee5f9fb15447fc71ae7bf9fea9379")
25+
set(win64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0-windows-x86_64.zip")
26+
set(win64_binary_sha256 "5c09d23786daa89ac433a1a8237f2bdee9f420fb0f2b8a9aded7894d532c0076")
2727

28-
set(winarm64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-arm64.zip")
29-
set(winarm64_binary_sha256 "86ccd6485bbd4bb41a1a858db397be5bca5e0de96858bf8dbba7a64407bd6c00")
28+
set(winarm64_binary_url "https://github.com/Kitware/CMake/releases/download/v4.1.0/cmake-4.1.0-windows-arm64.zip")
29+
set(winarm64_binary_sha256 "a41bc485de4d17f213e127d43a22d010eb180dfb004d15e6fc9b15662d432c06")

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The suite of CMake tools were created by Kitware in response to the need
1111
for a powerful, cross-platform build environment for open-source projects
1212
such as ITK and VTK.
1313

14-
The CMake python wheels provide `CMake 4.0.3 <https://cmake.org/cmake/help/v4.0/index.html>`_.
14+
The CMake python wheels provide `CMake 4.1.0 <https://cmake.org/cmake/help/v4.1/index.html>`_.
1515

1616
Latest Release
1717
--------------

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The suite of CMake tools were created by Kitware in response to the need
1515
for a powerful, cross-platform build environment for open-source projects
1616
such as `ITK <https://itk.org>`_ and `VTK <https://vtk.org>`_.
1717

18-
The CMake python wheels provide `CMake 4.0.3 <https://cmake.org/cmake/help/v4.0/index.html>`_.
18+
The CMake python wheels provide `CMake 4.1.0 <https://cmake.org/cmake/help/v4.1/index.html>`_.
1919

2020
.. toctree::
2121
:maxdepth: 2

docs/make_a_release.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Prerequisites
4444

4545
.. code:: console
4646
47-
$ git tag --sign -m 'cmake-python-distributions 4.0.3' 4.0.3 main
48-
$ git push origin 4.0.3
47+
$ git tag --sign -m 'cmake-python-distributions 4.1.0' 4.1.0 main
48+
$ git push origin 4.1.0
4949
5050
.. warning::
5151

docs/update_cmake_version.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Classic procedure:
2929
2. Execute `scripts/update_cmake_version.py` command line tool with the desired
3030
``X.Y.Z`` CMake version available for download. For example::
3131

32-
$ release=4.0.3
32+
$ release=4.1.0
3333
$ ./scripts/update_cmake_version.py $release
34-
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.0.3'
34+
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.1.0'
3535
[...]
36-
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.0.3' - done
37-
Updating 'CMakeUrls.cmake' with CMake version 4.0.3
38-
Updating 'CMakeUrls.cmake' with CMake version 4.0.3 - done
36+
Collecting URLs and SHA256s from 'https://api.github.com/repos/Kitware/CMake/releases/tags/v4.1.0' - done
37+
Updating 'CMakeUrls.cmake' with CMake version 4.1.0
38+
Updating 'CMakeUrls.cmake' with CMake version 4.1.0 - done
3939
Updating docs/index.rst
4040
Updating docs/index.rst - done
4141
Updating README.rst
@@ -46,7 +46,7 @@ Classic procedure:
4646
3. Create a topic named `update-to-cmake-X.Y.Z` and commit the changes.
4747
For example::
4848

49-
release=4.0.3
49+
release=4.1.0
5050
git switch -c update-to-cmake-$release
5151
git add -u CMakeUrls.cmake docs/index.rst README.rst tests/test_cmake.py docs/update_cmake_version.rst
5252
git commit -m "Update to CMake $release"

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ backend-path = ["_build_backend"]
55

66
[project]
77
name = "cmake"
8-
version = "4.0.3"
8+
version = "4.1.0"
99
description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software"
1010
keywords = ["CMake", "build", "c++", "fortran", "cross-platform", "cross-compilation"]
1111
readme = "README.rst"
@@ -131,6 +131,13 @@ config-settings."cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
131131
config-settings."cmake.define.CMAKE_JOB_POOL_LINK" = "link"
132132
config-settings."cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
133133

134+
[[tool.cibuildwheel.overrides]]
135+
select = ["*-manylinux_armv7l"]
136+
inherit.config-settings = "append"
137+
# disable some tests
138+
# - RunCMake.CompilerId fails because architecture id is not detected properly for gfortran on Ubuntu 20.04 https://gitlab.kitware.com/cmake/cmake/-/issues/27129
139+
config-settings."cmake.define.RUN_CMAKE_TEST_EXCLUDE" = "RunCMake.CompilerId"
140+
134141
[[tool.cibuildwheel.overrides]]
135142
select = ["*-musllinux_*"]
136143
inherit.config-settings = "append"

tests/test_cmake.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ def _get_scripts():
6464

6565
@all_tools
6666
def test_cmake_script(tool):
67-
expected_version = "4.0.3"
67+
expected_version = "4.1.0"
6868
scripts = [script for script in _get_scripts() if script.stem == tool]
6969
assert len(scripts) == 1
7070
output = subprocess.check_output([str(scripts[0]), "--version"]).decode("ascii")
7171
assert output.splitlines()[0] == f"{tool} version {expected_version}"
7272

7373

7474
def test_cmake_main():
75-
expected_version = "4.0.3"
75+
expected_version = "4.1.0"
7676
output = subprocess.run([sys.executable, "-m", "cmake", "--version"], text=True, capture_output=True, check=False).stdout
7777
assert output.splitlines()[0] == f"cmake version {expected_version}"

0 commit comments

Comments
 (0)