mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
set min required cmake version to 3.12
The already used functionallity already requires a more recent cmake version. Short summary why a never version is required: CMAKE_CXX_STANDARD requires >=3.1 CMAKE_COMPILER_IS_GNUCC requires >3.7 ENABLE_LTO can be simplified with >3.11 (3.13 VS)
This commit is contained in:
parent
39f7aa0900
commit
59f64d8d82
@ -1,12 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
cmake_policy(SET CMP0054 NEW)
|
||||||
if(NOT ${CMAKE_VERSION} VERSION_LESS "3.1")
|
|
||||||
cmake_policy(SET CMP0054 NEW)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# required since cmake 3.4 at least for libc++
|
||||||
|
set(CMAKE_ENABLE_EXPORTS ON)
|
||||||
|
|
||||||
project(chaiscript)
|
project(chaiscript)
|
||||||
|
|
||||||
option(MULTITHREAD_SUPPORT_ENABLED "Multithreaded Support Enabled" TRUE)
|
option(MULTITHREAD_SUPPORT_ENABLED "Multithreaded Support Enabled" TRUE)
|
||||||
@ -62,10 +62,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_LTO "Enable Link Time Optimization" FALSE)
|
option(ENABLE_LTO "Enable Link Time Optimization" FALSE)
|
||||||
|
if(ENABLE_LTO)
|
||||||
if (ENABLE_LTO)
|
check_ipo_supported()
|
||||||
add_definitions(-flto)
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||||
set(LINKER_FLAGS "${LINKER_FLAGS} -flto")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(GPROF_OUTPUT "Generate profile data" FALSE)
|
option(GPROF_OUTPUT "Generate profile data" FALSE)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user