|
|
@@ -33,19 +33,19 @@ set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
|
|
|
|
|
macro(cmake_record_cxx_compile_features)
|
|
|
macro(_get_gcc_features std_version list)
|
|
|
- record_compiler_features(CXX "-std=${std_version}" ${list})
|
|
|
+ record_compiler_features(CXX "${std_version}" ${list})
|
|
|
endmacro()
|
|
|
|
|
|
set(_result 0)
|
|
|
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
|
|
- _get_gcc_features(c++1y CMAKE_CXX14_COMPILE_FEATURES)
|
|
|
+ _get_gcc_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES)
|
|
|
endif()
|
|
|
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
|
|
|
if (_result EQUAL 0)
|
|
|
- _get_gcc_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
|
|
|
+ _get_gcc_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
|
|
|
endif()
|
|
|
if (_result EQUAL 0)
|
|
|
- _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
|
|
|
+ _get_gcc_features(${CMAKE_CXX98_STANDARD_COMPILE_OPTION} CMAKE_CXX98_COMPILE_FEATURES)
|
|
|
endif()
|
|
|
else()
|
|
|
set(_result 0)
|