summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-08 15:27:53 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-08 15:27:53 (GMT)
commit7b3def93b630ee7964b1d33b2b601e07c7797438 (patch)
tree574eca7299af0b5a5898d6aff6b83dc5aef66311 /Modules/Compiler
parent6eafe843ca632eadd896cca95c42420b48e2a9a2 (diff)
parent205215fb8a8aa950026d914377a54ae358a1c02a (diff)
downloadCMake-7b3def93b630ee7964b1d33b2b601e07c7797438.zip
CMake-7b3def93b630ee7964b1d33b2b601e07c7797438.tar.gz
CMake-7b3def93b630ee7964b1d33b2b601e07c7797438.tar.bz2
Merge topic 'decay-language-version'
205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay. 1df2116b Features: Decay language flag if requested is not available. c4f4dac2 Project: Fix exit-on-error with compile feature tests. 5bb7ce72 Project: Use nullary form of main for compile feature tests. 64254e7a Project: Remove extern from static string in feature tests. 0d9c99bf Help: Fix order of help entries. dc7639bd Tests: Fix name of cache variable.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU-CXX.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 6ec3958..d324985 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -24,17 +24,18 @@ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3)
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
endif()
+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})
- if (NOT _result EQUAL 0)
- return()
- endif()
endmacro()
if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
_get_gcc_features(c++11 CMAKE_CXX11_COMPILE_FEATURES)
- _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ if (_result EQUAL 0)
+ _get_gcc_features(c++98 CMAKE_CXX98_COMPILE_FEATURES)
+ endif()
else()
set(_result 0)
endif()