summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Compiler/AppleClang-C.cmake4
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake3
-rw-r--r--Modules/Compiler/Clang-C.cmake4
-rw-r--r--Modules/Compiler/Clang-CXX.cmake4
-rw-r--r--Modules/Compiler/GNU-C.cmake6
-rw-r--r--Modules/Compiler/GNU-CXX.cmake6
-rw-r--r--Modules/Compiler/Intel-C.cmake2
-rw-r--r--Modules/Compiler/Intel-CXX.cmake7
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake4
9 files changed, 24 insertions, 16 deletions
diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake
index fe39b3b..f874e74 100644
--- a/Modules/Compiler/AppleClang-C.cmake
+++ b/Modules/Compiler/AppleClang-C.cmake
@@ -27,7 +27,9 @@ endif()
macro(cmake_record_c_compile_features)
set(_result 0)
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
- _record_compiler_features_c(11)
+ if (_result EQUAL 0)
+ _record_compiler_features_c(11)
+ endif()
if (_result EQUAL 0)
_record_compiler_features_c(99)
endif()
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 8dd6278..afb9aff 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -38,8 +38,7 @@ endif()
macro(cmake_record_cxx_compile_features)
set(_result 0)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0)
- set(_result 0)
- if(CMAKE_CXX14_STANDARD_COMPILE_OPTION)
+ if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION)
_record_compiler_features_cxx(14)
endif()
if (_result EQUAL 0)
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
index b3f3805..bcd9218 100644
--- a/Modules/Compiler/Clang-C.cmake
+++ b/Modules/Compiler/Clang-C.cmake
@@ -36,7 +36,9 @@ endif()
macro(cmake_record_c_compile_features)
set(_result 0)
if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
- _record_compiler_features_c(11)
+ if (_result EQUAL 0)
+ _record_compiler_features_c(11)
+ endif()
if (_result EQUAL 0)
_record_compiler_features_c(99)
endif()
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index dfe0628..5ac43a3 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -46,7 +46,9 @@ endif()
macro(cmake_record_cxx_compile_features)
set(_result 0)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
- _record_compiler_features_cxx(14)
+ if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION)
+ _record_compiler_features_cxx(14)
+ endif()
if (_result EQUAL 0)
_record_compiler_features_cxx(11)
endif()
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 4dbf6ef..05c3bb2 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -41,10 +41,10 @@ endif()
macro(cmake_record_c_compile_features)
set(_result 0)
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
- _record_compiler_features_c(11)
- endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+ if(_result EQUAL 0 AND CMAKE_C11_STANDARD_COMPILE_OPTION)
+ _record_compiler_features_c(11)
+ endif()
if (_result EQUAL 0)
_record_compiler_features_c(99)
endif()
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 936f62b..4150d94 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -48,10 +48,10 @@ endif()
macro(cmake_record_cxx_compile_features)
set(_result 0)
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
- _record_compiler_features_cxx(14)
- endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
+ if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION)
+ _record_compiler_features_cxx(14)
+ endif()
if (_result EQUAL 0)
_record_compiler_features_cxx(11)
endif()
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index 5a79452..6408392 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -49,7 +49,7 @@ unset(_ext)
macro(cmake_record_c_compile_features)
set(_result 0)
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
+ if (_result EQUAL 0 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
_record_compiler_features_C(11)
endif()
if (_result EQUAL 0)
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index d01d38d..9c39236 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -66,9 +66,10 @@ unset(_ext)
macro(cmake_record_cxx_compile_features)
set(_result 0)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0
- OR (NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND
- NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))
+ if (_result EQUAL 0 AND
+ (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0
+ OR (NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND
+ NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)))
_record_compiler_features_cxx(14)
endif()
if (_result EQUAL 0)
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()