Skip to content

Commit 1594e91

Browse files
committed
Raise required CMake version to 3.18
CMake 3.31 deprecates compatibility with CMake < 3.10 and CMake 4.0 removes compatibility with CMake < 3.5 entirely. As the required CMake version hasn't been raised in 12 years, select 3.18 as a reasonably recent minimum CMake version with wide availability (Ubuntu Jammy ships 3.22, Debian oldstable Bullseye ships 3.18). Remove cmake_policy() calls that now default to NEW due to the higher minimum version requirement. A further benefit of this is that CMP0065[1] now also defaults to NEW, which means that the `hhvm` binary is no longer linked with `--export-dynamic`, making the (stripped) binary around 30MiB smaller. OSS could also choose to supply an explicit dynamic list as a followup as done in D2747334 and D67114451, but it doesn't seem to be required just now. [1] https://cmake.org/cmake/help/latest/policy/CMP0065.html
1 parent a4a9982 commit 1594e91

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
2-
# Make `get_target_property()` on a target that does not exist a fatal error
3-
# https://cmake.org/cmake/help/v3.0/policy/CMP0045.html
4-
cmake_policy(SET CMP0045 NEW)
5-
# ditto for add_dependencies(): https://cmake.org/cmake/help/v3.0/policy/CMP0046.html
6-
cmake_policy(SET CMP0046 NEW)
1+
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
72

83
set(CMAKE_CXX_STANDARD 20)
94
set(CMAKE_CXX_STANDARD_REQUIRED ON)

0 commit comments

Comments
 (0)