[Cmake-commits] CMake branch, next, updated. v3.1.0-1733-g78bb456

Stephen Kelly steveire at gmail.com
Sun Jan 11 12:49:10 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  78bb45601fe03f041adcac56e98acac7b82213a7 (commit)
       via  4480092c7b19da6e020c2f893c5b08d9acf1ab81 (commit)
       via  b594522f7b50d99ce52c2ae40e5604bc59093097 (commit)
       via  b8441bfcf23ab38367bcda8ca9ea004a02b1bfa5 (commit)
       via  5fb5b9a0ad4e346c94e7d90d32eb3b8f95b7d1f7 (commit)
       via  aa86b9a9e346313dae56c34b662407441c602471 (commit)
       via  9f5b65e3f0fccfa5749d24a867a1bb3ca7f500d5 (commit)
       via  070921f6e04ca45aa74ceaf298b3d0155f3ca926 (commit)
       via  0b5df0345c38624636d3ec29a8efc254b9d28a43 (commit)
       via  c120afd24eb8d3e07e941480c9d1081f47c77250 (commit)
       via  900c349fff49949f0380e094913fd3da4b2ebc53 (commit)
       via  00f66a045144a363b497874613457fe0cf80683f (commit)
      from  71372f0784a5c25b21ab070461730781149eb35b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78bb45601fe03f041adcac56e98acac7b82213a7
commit 78bb45601fe03f041adcac56e98acac7b82213a7
Merge: 71372f0 4480092
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 12:49:09 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 11 12:49:09 2015 -0500

    Merge topic 'GNU-4.6-compile-features' into next
    
    4480092c Features: Record for GNU 4.6.
    b594522f Features: Record that variadic_templates does not work with GNU 4.6.
    b8441bfc Features: Extend the generalized_initializers test for GNU 4.6.
    5fb5b9a0 Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU 4.6 compatibility.
    aa86b9a9 Features: Don't test __cplusplus value for CXX98 on GNU.
    9f5b65e3 Features: Test an old value of __STDC_VERSION__ for GNU 4.6 compatibility.
    070921f6 Features: Record C/CXX dialect flags for GNU 4.6.
    0b5df034 Features: Remove wrong content from else() condition.
    c120afd2 Features: Make cxx_noexcept available from GNU 4.6.
    900c349f Update the default_dialect test for old GNU-like compilers.
    00f66a04 Record compile features for GNU on Apple.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4480092c7b19da6e020c2f893c5b08d9acf1ab81
commit 4480092c7b19da6e020c2f893c5b08d9acf1ab81
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 10 20:05:54 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:46:00 2015 +0100

    Features: Record for GNU 4.6.

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 2720fbc..07200f4 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -28,7 +28,7 @@ macro(cmake_record_c_compile_features)
     record_compiler_features(C "${std_version}" ${list})
   endmacro()
 
-  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 89d9efe..35fff95 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}")
@@ -61,7 +61,7 @@ set(_cmake_feature_test_cxx_variadic_templates "${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 e746267..18bcf15 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()
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 9fb8d1b..75beaf7 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -144,7 +144,12 @@ if (CMAKE_CXX_COMPILE_FEATURES)
   add_executable(IfaceCompileFeatures main.cpp)
   target_link_libraries(IfaceCompileFeatures iface)
 
-  add_definitions(-DEXPECT_OVERRIDE_CONTROL=1)
+  if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+      AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+    add_definitions(-DEXPECT_OVERRIDE_CONTROL=1)
+  else()
+    add_definitions(-DEXPECT_OVERRIDE_CONTROL=0)
+  endif()
 
   add_executable(CompileFeaturesGenex genex_test.cpp)
   set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b594522f7b50d99ce52c2ae40e5604bc59093097
commit b594522f7b50d99ce52c2ae40e5604bc59093097
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 18:44:49 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:46:00 2015 +0100

    Features: Record that variadic_templates does not work with GNU 4.6.
    
    The unit test for this fails with
    
    Building CXX object CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o
    /home/stephen/dev/src/cmake/Tests/CompileFeatures/cxx_variadic_templates.cpp: In static member function ‘static int Interface<I, Is>::accumulate()’:
    /home/stephen/dev/src/cmake/Tests/CompileFeatures/cxx_variadic_templates.cpp:18:31: sorry, unimplemented: cannot expand ‘Is ...’ into a fixed-length argument list
    CMakeFiles/test_cxx_variadic_templates.dir/build.make:54: recipe for target 'CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o' failed

diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 41f1803..89d9efe 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -49,6 +49,7 @@ set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
+set(_cmake_feature_test_cxx_variadic_templates "${GNU47_CXX11}")
 # NOTE: C++11 was ratified in September 2011. GNU 4.7 is the first minor
 # release following that (March 2012), and the first minor release to
 # support -std=c++11. Prior to that, support for C++11 features is technically
@@ -86,7 +87,6 @@ set(_cmake_feature_test_cxx_strong_enums "${GNU44_CXX11}")
 set(_cmake_feature_test_cxx_trailing_return_types "${GNU44_CXX11}")
 set(_cmake_feature_test_cxx_unicode_literals "${GNU44_CXX11}")
 set(_cmake_feature_test_cxx_uniform_initialization "${GNU44_CXX11}")
-set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
 # TODO: If features are ever recorded for GNU 4.3, there should possibly
 # be a new feature added like cxx_variadic_template_template_parameters,
 # which is implemented by GNU 4.4, but not 4.3. cxx_variadic_templates is

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8441bfcf23ab38367bcda8ca9ea004a02b1bfa5
commit b8441bfcf23ab38367bcda8ca9ea004a02b1bfa5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 18:43:31 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:46:00 2015 +0100

    Features: Extend the generalized_initializers test for GNU 4.6.
    
    That compiler requires a different initializer_list constructor, so
    update the test to match.

diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
index 8013ef5..7bf356b 100644
--- a/Tests/CompileFeatures/cxx_generalized_initializers.cpp
+++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
@@ -8,6 +8,7 @@ namespace std {
     const _E* __begin_;
     size_t    __size_;
 
+    initializer_list(const int*, long unsigned int) {}
   };
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fb5b9a0ad4e346c94e7d90d32eb3b8f95b7d1f7
commit 5fb5b9a0ad4e346c94e7d90d32eb3b8f95b7d1f7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 16:22:24 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:26 2015 +0100

    Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU 4.6 compatibility.

diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 27cff40..41f1803 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -54,8 +54,13 @@ set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
 # support -std=c++11. Prior to that, support for C++11 features is technically
 # experiemental and possibly incomplete (see for example the note below about
 # cxx_variadic_template_template_parameters)
+# GNU does not define __cplusplus correctly before version 4.7.
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
+# __GXX_EXPERIMENTAL_CXX0X__ is defined in prior versions, but may not be
+# 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} && __cplusplus >= 201103L")
+set(GNU46_CXX11 "${_cmake_oldestSupported} && ${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}")
@@ -64,13 +69,13 @@ set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
 set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
 set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}")
 # TODO: Should be supported by GNU 4.5
-set(GNU45_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
+set(GNU45_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
 set(_cmake_feature_test_cxx_explicit_conversions "${GNU45_CXX11}")
 set(_cmake_feature_test_cxx_lambdas "${GNU45_CXX11}")
 set(_cmake_feature_test_cxx_local_type_template_args "${GNU45_CXX11}")
 set(_cmake_feature_test_cxx_raw_string_literals "${GNU45_CXX11}")
 # TODO: Should be supported by GNU 4.4
-set(GNU44_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
+set(GNU44_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
 set(_cmake_feature_test_cxx_auto_type "${GNU44_CXX11}")
 set(_cmake_feature_test_cxx_defaulted_functions "${GNU44_CXX11}")
 set(_cmake_feature_test_cxx_deleted_functions "${GNU44_CXX11}")
@@ -90,7 +95,7 @@ set(_cmake_feature_test_cxx_variadic_templates "${GNU44_CXX11}")
 # templates capability in CMake. See
 # http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
 # TODO: Should be supported by GNU 4.3
-set(GNU43_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
+set(GNU43_CXX11 "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
 set(_cmake_feature_test_cxx_decltype "${GNU43_CXX11}")
 set(_cmake_feature_test_cxx_default_function_template_args "${GNU43_CXX11}")
 set(_cmake_feature_test_cxx_long_long_type "${GNU43_CXX11}")
@@ -98,8 +103,8 @@ set(_cmake_feature_test_cxx_right_angle_brackets "${GNU43_CXX11}")
 set(_cmake_feature_test_cxx_rvalue_references "${GNU43_CXX11}")
 set(_cmake_feature_test_cxx_static_assert "${GNU43_CXX11}")
 # TODO: Should be supported since GNU 3.4?
-set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported} && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
 # TODO: Should be supported forever?
-set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported} && __cplusplus >= 201103L")
-set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported} && __cplusplus >= 201103L")
+set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
+set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported} && ${GNU_CXX0X_DEFINED}")
 set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa86b9a9e346313dae56c34b662407441c602471
commit aa86b9a9e346313dae56c34b662407441c602471
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 16:23:34 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:26 2015 +0100

    Features: Don't test __cplusplus value for CXX98 on GNU.
    
    The macro is defined to 1 for GNU 4.6, and such a test is only
    useful for features in language dialects newer than the
    default (CXX98 for GNU currently).

diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 03b53e1..27cff40 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -102,4 +102,4 @@ set(_cmake_feature_test_cxx_extern_templates "${_cmake_oldestSupported} && __cpl
 # TODO: Should be supported forever?
 set(_cmake_feature_test_cxx_func_identifier "${_cmake_oldestSupported} && __cplusplus >= 201103L")
 set(_cmake_feature_test_cxx_variadic_macros "${_cmake_oldestSupported} && __cplusplus >= 201103L")
-set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported} && __cplusplus >= 199711L")
+set(_cmake_feature_test_cxx_template_template_parameters "${_cmake_oldestSupported}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f5b65e3f0fccfa5749d24a867a1bb3ca7f500d5
commit 9f5b65e3f0fccfa5749d24a867a1bb3ca7f500d5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 16:20:03 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:26 2015 +0100

    Features: Test an old value of __STDC_VERSION__ for GNU 4.6 compatibility.

diff --git a/Modules/Compiler/GNU-C-FeatureTests.cmake b/Modules/Compiler/GNU-C-FeatureTests.cmake
index dfaeebf..ddac0e8 100644
--- a/Modules/Compiler/GNU-C-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-C-FeatureTests.cmake
@@ -1,7 +1,12 @@
 
 set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407")
 
-set(GNU46_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L")
+# 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(_cmake_feature_test_c_static_assert "${GNU46_C11}")
 # Since 4.4 at least:
 set(GNU44_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=070921f6e04ca45aa74ceaf298b3d0155f3ca926
commit 070921f6e04ca45aa74ceaf298b3d0155f3ca926
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 16:09:50 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:26 2015 +0100

    Features: Record C/CXX dialect flags for GNU 4.6.
    
    This release was prior to standardization of C11/CXX11.

diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 031eb81..2720fbc 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -1,15 +1,20 @@
 include(Compiler/GNU)
 __compiler_gnu(C)
 
-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
   set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
   set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
 
   set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
   set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
+endif()
 
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
   set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
   set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
+elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
+  set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c1x")
+  set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x")
 endif()
 
 if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 4a26963..e746267 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -11,7 +11,7 @@ else()
   endif()
 endif()
 
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
   # Supported since 4.3
   set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
   set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
@@ -20,7 +20,10 @@ endif()
 if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
   set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
   set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
+elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
   # 4.3 supports 0x variants
+  set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x")
+  set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
 endif()
 
 if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b5df0345c38624636d3ec29a8efc254b9d28a43
commit 0b5df0345c38624636d3ec29a8efc254b9d28a43
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 16:14:26 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:25 2015 +0100

    Features: Remove wrong content from else() condition.
    
    As this is not elseif(), the content has no effect.
    
    Rather than changing it to an elseif(), remove the conditional content.
    All versions of GNU prior to 5.0 default to C90/89.
    
    Clang-C.cmake has a similar code block which correctly uses
    elseif() for setting the default C dialect to C99.  That may have
    been updated from a C90 default at some point, so leave the
    version condition there in place for now.

diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index db9089d..031eb81 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -14,7 +14,7 @@ endif()
 
 if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
   set(CMAKE_C_STANDARD_DEFAULT 11)
-else(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
+else()
   set(CMAKE_C_STANDARD_DEFAULT 90)
 endif()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c120afd24eb8d3e07e941480c9d1081f47c77250
commit c120afd24eb8d3e07e941480c9d1081f47c77250
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 11 15:55:09 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:25 2015 +0100

    Features: Make cxx_noexcept available from GNU 4.6.
    
    As listed in the reference document.

diff --git a/Modules/Compiler/GNU-CXX-FeatureTests.cmake b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
index 6de06dd..03b53e1 100644
--- a/Modules/Compiler/GNU-CXX-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-CXX-FeatureTests.cmake
@@ -46,7 +46,6 @@ set(_cmake_feature_test_cxx_alias_templates "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_delegating_constructors "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_extended_friend_declarations "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_final "${GNU47_CXX11}")
-set(_cmake_feature_test_cxx_noexcept "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_nonstatic_member_init "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_override "${GNU47_CXX11}")
 set(_cmake_feature_test_cxx_user_literals "${GNU47_CXX11}")
@@ -60,6 +59,7 @@ set(GNU46_CXX11 "${_cmake_oldestSupported} && __cplusplus >= 201103L")
 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}")
+set(_cmake_feature_test_cxx_noexcept "${GNU46_CXX11}")
 set(_cmake_feature_test_cxx_nullptr "${GNU46_CXX11}")
 set(_cmake_feature_test_cxx_range_for "${GNU46_CXX11}")
 set(_cmake_feature_test_cxx_unrestricted_unions "${GNU46_CXX11}")

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=900c349fff49949f0380e094913fd3da4b2ebc53
commit 900c349fff49949f0380e094913fd3da4b2ebc53
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 9 20:18:24 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:25 2015 +0100

    Update the default_dialect test for old GNU-like compilers.
    
    Prior to GNU 4.7, GNU defined __cplusplus incorrectly, and defined
    __GXX_EXPERIMENTAL_CXX0X__ in C++11 mode.

diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp
index 8d97926..a2ca268 100644
--- a/Tests/CompileFeatures/default_dialect.cpp
+++ b/Tests/CompileFeatures/default_dialect.cpp
@@ -14,7 +14,7 @@ Outputter<__cplusplus> o;
 #  if !DEFAULT_CXX98
 #    error Buildsystem error
 #  endif
-#  if __cplusplus != 199711L
+#  if __cplusplus != 199711L && __cplusplus != 1 && !defined(__GXX_EXPERIMENTAL_CXX0X__)
 Outputter<__cplusplus> o;
 #  endif
 #endif

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00f66a045144a363b497874613457fe0cf80683f
commit 00f66a045144a363b497874613457fe0cf80683f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 9 20:18:25 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 11 18:34:25 2015 +0100

    Record compile features for GNU on Apple.
    
    Tested with GNU 4.8 binary (bottle) from homebrew, and assumed to work
    with the others.

diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 9018450..db9089d 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -23,7 +23,7 @@ macro(cmake_record_c_compile_features)
     record_compiler_features(C "${std_version}" ${list})
   endmacro()
 
-  if (UNIX AND NOT APPLE AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
+  if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
     _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.cmake b/Modules/Compiler/GNU-CXX.cmake
index a91c901..4a26963 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -39,10 +39,10 @@ macro(cmake_record_cxx_compile_features)
   endmacro()
 
   set(_result 0)
-  if (UNIX AND NOT APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+  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 APPLE AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+  if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
     if (_result EQUAL 0)
       _get_gcc_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
     endif()

-----------------------------------------------------------------------

Summary of changes:
 Modules/Compiler/GNU-CXX-FeatureTests.cmake            |    2 +-
 Tests/CompileFeatures/CMakeLists.txt                   |    7 ++++++-
 Tests/CompileFeatures/cxx_generalized_initializers.cpp |    1 +
 3 files changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list