diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-10 19:05:54 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-15 23:11:01 (GMT) |
commit | b15c008fac22720ccd793b18c235046bc84ecc86 (patch) | |
tree | a408797157bd20bd9e018e26cf5a867476322383 /Modules/Compiler | |
parent | f13a2eb118d8b152a897e09fdcf43793f8e1bcca (diff) | |
download | CMake-b15c008fac22720ccd793b18c235046bc84ecc86.zip CMake-b15c008fac22720ccd793b18c235046bc84ecc86.tar.gz CMake-b15c008fac22720ccd793b18c235046bc84ecc86.tar.bz2 |
Features: Record for GNU 4.6.
Adjust the CompileFeatures genex_test for the expectation of the
OVERRIDE_CONTROL feature group.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU-C-FeatureTests.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/GNU-C.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX-FeatureTests.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/GNU-CXX.cmake | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Modules/Compiler/GNU-C-FeatureTests.cmake b/Modules/Compiler/GNU-C-FeatureTests.cmake index ddac0e8..7e840aa 100644 --- a/Modules/Compiler/GNU-C-FeatureTests.cmake +++ b/Modules/Compiler/GNU-C-FeatureTests.cmake @@ -1,12 +1,12 @@ -set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407") +set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406") # GNU 4.7 correctly sets __STDC_VERSION__ to 201112L, but GNU 4.6 sets it # to 201000L. As the former is strictly greater than the latter, test only # for the latter. If in the future CMake learns about a C feature which was # introduced with GNU 4.7, that should test for the correct version, similar # to the distinction between __cplusplus and __GXX_EXPERIMENTAL_CXX0X__ tests. -set(GNU46_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L") +set(GNU46_C11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L") set(_cmake_feature_test_c_static_assert "${GNU46_C11}") # Since 4.4 at least: set(GNU44_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L") diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 8faf4e4..d5e747d 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -29,7 +29,7 @@ macro(cmake_record_c_compile_features) endmacro() set(_result 0) - if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7) + if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) _get_gcc_features(${CMAKE_C11_STANDARD_COMPILE_OPTION} CMAKE_C11_COMPILE_FEATURES) if (_result EQUAL 0) _get_gcc_features(${CMAKE_C99_STANDARD_COMPILE_OPTION} CMAKE_C99_COMPILE_FEATURES) diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake index 3c6c663..267d658 100644 --- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake +++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake @@ -2,7 +2,7 @@ # Reference: http://gcc.gnu.org/projects/cxx0x.html # http://gcc.gnu.org/projects/cxx1y.html -set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407") +set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406") set(GNU50_CXX14 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L") set(_cmake_feature_test_cxx_variable_templates "${GNU50_CXX14}") @@ -60,7 +60,7 @@ set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}") # defined in the future. set(GNU_CXX0X_DEFINED "(__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__))") # TODO: Should be supported by GNU 4.6 -set(GNU46_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}") +set(GNU46_CXX11 "(__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && ${GNU_CXX0X_DEFINED}") set(_cmake_feature_test_cxx_constexpr "${GNU46_CXX11}") set(_cmake_feature_test_cxx_defaulted_move_initializers "${GNU46_CXX11}") set(_cmake_feature_test_cxx_enum_forward_declarations "${GNU46_CXX11}") diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index c03cc4b..eeada86 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -45,7 +45,7 @@ macro(cmake_record_cxx_compile_features) if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) _get_gcc_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES) endif() - if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) + if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6) if (_result EQUAL 0) _get_gcc_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) endif() |