Skip to content

Commit 4072637

Browse files
committed
build: raise cmake_minimum_required to 3.18
libcurl requires CMake 3.18 [1], and nghttp2 asks for 3.14 since 1.70.0 [2]. We build both as ExternalProjects and a fresh CMake is a prerequisite to update these dependencies. Modern Linux distros offer 3.18 or newer, but some EOL ones don't: CentOS 7, Ubuntu 20.04 for example. PackPack backports repositories offer CMake 3.18 for some of them, see [3]. 3.5 -> 3.18 sets 43 policies to NEW (CMP0066..CMP0108). Only CMP0082 changes the generated files: install rules from `add_subdirectory()` now run where the call is, not after all rules of the current scope. It only reorders src/lib and src/box, which install nothing. CMP0068 is the only behaviour change we could meet, on macOS only: `CMAKE_SKIP_RPATH` stops suppressing `install_name` for our dynamic libraries, which are not installed and used only for testing. Shifting the minimum CMake version allows to eliminate a few workarounds created for older versions. I plan to remove them in a separate series. [1]: curl/curl#20407 [2]: https://github.com/nghttp2/nghttp2/blob/v1.70.0/CMakeLists.txt [3]: https://github.com/orgs/packpack/discussions/159 Drafted by an LLM, conducted and corrected by the commit author. Fixes tarantool#13306 NO_CHANGELOG=build NO_DOC=build NO_TEST=build
1 parent 394694e commit 4072637

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎.github/workflows/static_build_cmake_linux.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,12 @@ jobs:
8989
with:
9090
submodule: ${{ inputs.submodule }}
9191
revision: ${{ inputs.revision }}
92-
# Install CMake using PyPI, because option
93-
# `--repeat until-pass:3` required by CTest was added since
94-
# CMake 3.17.
92+
# Install CMake using PyPI: the container's CMake is older
93+
# than the minimum required by the project.
9594
- name: install cmake
9695
run: |
9796
apt -y remove cmake
98-
pip3 install cmake==3.17.3
97+
pip3 install cmake==3.18.4.post1
9998
- name: test
10099
run: make -f .test.mk test-static-cmake
101100
- name: Send VK Teams message on failure

‎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.5)
1+
cmake_minimum_required(VERSION 3.18)
22

33
project(tarantool C CXX ASM)
44

‎static-build/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.5)
1+
cmake_minimum_required(VERSION 3.18)
22

33
# Detect system compilers for further dependencies configuring to be
44
# built with these compilers. This is used to build tarantool and

0 commit comments

Comments
 (0)