|
|
|
|
165
|
include(CheckCXXCompilerFlag)
|
165
|
include(CheckCXXCompilerFlag)
|
166
|
CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
|
166
|
CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
|
167
|
CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
|
167
|
CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
|
|
|
168
|
+CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
|
168
|
|
169
|
|
169
|
if(COMPILER_SUPPORTS_CXX14)
|
170
|
if(COMPILER_SUPPORTS_CXX14)
|
170
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
171
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
171
|
elseif(COMPILER_SUPPORTS_CXX11)
|
172
|
elseif(COMPILER_SUPPORTS_CXX11)
|
172
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
173
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
174
|
+elseif(COMPILER_SUPPORTS_CXX0X)
|
|
|
175
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
173
|
else()
|
176
|
else()
|
174
|
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
|
177
|
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
|
175
|
endif()
|
178
|
endif()
|