Update cmake template file in drogon_ctl

This commit is contained in:
antao 2018-10-17 14:00:23 +08:00
parent 3ccb1490a9
commit 1b37db12e0

View File

@ -9,12 +9,9 @@ endif()
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
EXEC_PROGRAM (gcc ARGS "--version | grep '^gcc'|awk '{print $3}' | sed s'/)//g' | sed s'/-.*//g'" OUTPUT_VARIABLE version)
MESSAGE(STATUS "This is gcc version:: " ${version})
if(version LESS 4.9.0)
if(version LESS 5.4.0)
MESSAGE(STATUS "gcc is too old")
stop()
elseif (version LESS 6.1.0)
MESSAGE(STATUS "c++11")
set(CMAKE_CXX_STD_FLAGS c++11)
elseif(version LESS 7.1.0)
set(CMAKE_CXX_STD_FLAGS c++14)
MESSAGE(STATUS "c++14")
@ -24,7 +21,7 @@ IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
MESSAGE(STATUS "c++17")
endif()
else()
set(CMAKE_CXX_STD_FLAGS c++11)
set(CMAKE_CXX_STD_FLAGS c++17)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "")