Skip to content

Commit

Permalink
Update required cmake version as of cmake 3.31 for samples (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiusTheBest committed Dec 12, 2024
1 parent 417f763 commit 7993c3e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion samples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
cmake_minimum_required(VERSION 3.0)
else()
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
cmake_minimum_required(VERSION 3.6)
else()
cmake_minimum_required(VERSION 3.10)
endif()

if(POLICY CMP0063) #Honor visibility properties for all target types
Expand Down
8 changes: 5 additions & 3 deletions samples/CXX11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
if (NOT CMAKE_VERSION VERSION_LESS 3.3.0)
if(NOT CMAKE_VERSION VERSION_LESS 3.3.0)
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
cmake_minimum_required(VERSION 3.3)
else()
cmake_minimum_required(VERSION 3.0)
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
cmake_minimum_required(VERSION 3.6)
else()
cmake_minimum_required(VERSION 3.10)
endif()

if(cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
Expand Down
8 changes: 5 additions & 3 deletions samples/CXX17/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
if (NOT CMAKE_VERSION VERSION_LESS 3.3.0)
if(NOT CMAKE_VERSION VERSION_LESS 3.3.0)
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
cmake_minimum_required(VERSION 3.3)
else()
cmake_minimum_required(VERSION 3.0)
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
cmake_minimum_required(VERSION 3.6)
else()
cmake_minimum_required(VERSION 3.10)
endif()

# Unfortunately cxx_std_17 in CMAKE_CXX_COMPILE_FEATURES is not reliable, so check include files
Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
if(${CMAKE_VERSION} VERSION_LESS 3.27.0)
cmake_minimum_required(VERSION 3.1)
else()
elseif(${CMAKE_VERSION} VERSION_LESS 3.31.0)
cmake_minimum_required(VERSION 3.6)
else()
cmake_minimum_required(VERSION 3.10)
endif()

project(PlogTest CXX)
Expand Down

0 comments on commit 7993c3e

Please sign in to comment.