|
|
|
@ -188,13 +188,13 @@ endif ()
@@ -188,13 +188,13 @@ endif ()
|
|
|
|
|
include(CheckCXXCompilerFlag) |
|
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=c++17" CXX17_SUPPORTED) |
|
|
|
|
CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX11_SUPPORTED) |
|
|
|
|
if (CXX17_SUPPORTED) |
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17" ) |
|
|
|
|
elseif (CXX11_SUPPORTED) |
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" ) |
|
|
|
|
else |
|
|
|
|
if(CXX17_SUPPORTED) |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") |
|
|
|
|
elseif(CXX11_SUPPORTED) |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
|
|
|
|
else() |
|
|
|
|
message(SEND_ERROR "C++17 nor C++11 standard not seems to be supported by compiler. Too old version?") |
|
|
|
|
endif () |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe") |
|
|
|
|