Skip to content

Commit dd14376

Browse files
authored
Bump CMake minimum version to 3.12 (#5245)
With CMake 4 the minimum support version is 3.5, and since the current minimum version we set is 2.8.12, it will fail with the following message: CMake Error at CMakeLists.txt:3 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. However, instead of bumping the minimum version requirement to 3.5, bump to a slightly higher 3.12 instead to be consistent with examples/usdt_sample/. Also update cmake_policy() calls due to this change, dropping CMP0057 since the OLD behavior is no longer supported anyway.
1 parent a2da647 commit dd14376

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
# Copyright (c) PLUMgrid, Inc.
22
# Licensed under the Apache License, Version 2.0 (the "License")
3-
cmake_minimum_required(VERSION 2.8.12)
4-
5-
if(${CMAKE_VERSION} VERSION_EQUAL 3.12.0 OR ${CMAKE_VERSION} VERSION_GREATER 3.12.0)
6-
cmake_policy(SET CMP0074 NEW)
7-
endif()
8-
9-
if(${CMAKE_VERSION} VERSION_EQUAL 3.3.0 OR ${CMAKE_VERSION} VERSION_GREATER 3.3.0)
10-
cmake_policy(SET CMP0057 NEW)
11-
endif()
3+
cmake_minimum_required(VERSION 3.12)
4+
cmake_policy(SET CMP0074 NEW)
125

136
project(bcc)
147
if(NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)