diff options
author | Brad King <brad.king@kitware.com> | 2016-11-30 20:15:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-12-02 16:22:43 (GMT) |
commit | 684e4d205d64ff8b98c00a1d6a358bffbf509c62 (patch) | |
tree | 55e5ba78f5658823eda8d299e671bdec7f14b412 /Modules/Compiler/SunPro-CXX.cmake | |
parent | f2035cbd0d631698ec911e72d0d857fd32d2db7a (diff) | |
download | CMake-684e4d205d64ff8b98c00a1d6a358bffbf509c62.zip CMake-684e4d205d64ff8b98c00a1d6a358bffbf509c62.tar.gz CMake-684e4d205d64ff8b98c00a1d6a358bffbf509c62.tar.bz2 |
Features: Make feature recording conditions more consistent
Condition all calls to `_record_compiler_features_{c,cxx}` on
`_result EQUAL 0` so that adding new language standards later does
not need to update them. Avoid some duplicate compiler version
checks by conditioning C11 and CXX14 feature recording on the
existence of `CMAKE_{C11,CXX14}_STANDARD_COMPILE_OPTION` (whose
setting already used the version check).
Diffstat (limited to 'Modules/Compiler/SunPro-CXX.cmake')
-rw-r--r-- | Modules/Compiler/SunPro-CXX.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index e83c896..f4345b8 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -53,7 +53,9 @@ endif() macro(cmake_record_cxx_compile_features) set(_result 0) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) - _record_compiler_features_cxx(11) + if (_result EQUAL 0) + _record_compiler_features_cxx(11) + endif() if (_result EQUAL 0) _record_compiler_features_cxx(98) endif() |