mirror of
https://github.com/Icinga/icinga2.git
synced 2026-02-18 18:19:13 -05:00
Raise cmake minimum required version to 3.8...3.17
CMake version `< 3.5` is no longer supported, so the new CMake minimum policy version is set to `3.8` to support C++17 unconditionally. After checking all the policies that might affect Icinga 2 in any way, CMake `3.17` is used as a max supported CMake policy. Anything above that may work but we didn't explicitly verify the policies introduced with CMake 3.18 and later and may or may not affect Icinga 2.
This commit is contained in:
parent
797f3c55b0
commit
b25acf0e4e
1 changed files with 5 additions and 10 deletions
|
|
@ -1,17 +1,12 @@
|
|||
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
# CMake 3.8 is required, CMake policy compatibility was verified up to 3.17.
|
||||
cmake_minimum_required(VERSION 3.8...3.17)
|
||||
set(BOOST_MIN_VERSION "1.66.0")
|
||||
|
||||
if("${CMAKE_VERSION}" VERSION_LESS "3.8") # SLES 12.5
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
project(icinga2)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
|
|
|||
Loading…
Reference in a new issue