Skip to content

Commit 1103d73

Browse files
Update required cmake version as of cmake 3.31 for samples (#296)
1 parent 417f763 commit 1103d73

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

samples/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
22
cmake_minimum_required(VERSION 3.0)
3-
else()
3+
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
44
cmake_minimum_required(VERSION 3.6)
5+
else()
6+
cmake_minimum_required(VERSION 3.10)
57
endif()
68

79
if(POLICY CMP0063) #Honor visibility properties for all target types

samples/CXX11/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
if (NOT CMAKE_VERSION VERSION_LESS 3.3.0)
1+
if(NOT CMAKE_VERSION VERSION_LESS 3.3.0)
22
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
33
cmake_minimum_required(VERSION 3.3)
4-
else()
4+
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
55
cmake_minimum_required(VERSION 3.6)
6+
else()
7+
cmake_minimum_required(VERSION 3.10)
68
endif()
79

810
if(cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES)

samples/CXX17/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
if (NOT CMAKE_VERSION VERSION_LESS 3.3.0)
1+
if(NOT CMAKE_VERSION VERSION_LESS 3.3.0)
22
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
33
cmake_minimum_required(VERSION 3.3)
4-
else()
4+
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
55
cmake_minimum_required(VERSION 3.6)
6+
else()
7+
cmake_minimum_required(VERSION 3.10)
68
endif()
79

810
# Unfortunately cxx_std_17 in CMAKE_CXX_COMPILE_FEATURES is not reliable, so check include files

test/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
22
cmake_minimum_required(VERSION 3.1)
3-
else()
3+
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
44
cmake_minimum_required(VERSION 3.6)
5+
else()
6+
cmake_minimum_required(VERSION 3.10)
57
endif()
68

79
project(PlogTest CXX)
@@ -102,7 +104,11 @@ if(CMAKE_VERSION VERSION_LESS 3.8.0)
102104
return()
103105
endif()
104106

105-
cmake_policy(VERSION 3.8)
107+
if(${CMAKE_VERSION} VERSION_LESS 3.31.0)
108+
cmake_policy(VERSION 3.8)
109+
else()
110+
cmake_policy(VERSION 3.10)
111+
endif()
106112

107113
set(PLOG_CXX_STANDARDS_LIST LIST cxx_std_11 cxx_std_14 cxx_std_17 cxx_std_20 cxx_std_23)
108114

0 commit comments

Comments
 (0)