[Cmake-commits] CMake branch, next, updated. v3.1.0-1967-gb49af13

Stephen Kelly steveire at gmail.com
Thu Jan 15 15:54:21 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  b49af13bc15f01dd45f05c331e79d56dbd185d09 (commit)
       via  06ff525492b32cd3182c185c908c526379766912 (commit)
      from  fb74a6fbfbbf235ce1c34323825b703ed453af7b (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=b49af13bc15f01dd45f05c331e79d56dbd185d09
commit b49af13bc15f01dd45f05c331e79d56dbd185d09
Merge: fb74a6f 06ff525
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 15 15:54:20 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 15 15:54:20 2015 -0500

    Merge topic 'extend-COMPILE_FEATURES-test' into next
    
    06ff5254 Features: Extend the tests for the COMPILE_FEATURES genex.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06ff525492b32cd3182c185c908c526379766912
commit 06ff525492b32cd3182c185c908c526379766912
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 12 20:02:17 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jan 15 21:51:18 2015 +0100

    Features: Extend the tests for the COMPILE_FEATURES genex.

diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 4308508..5ca1eb7 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -144,11 +144,56 @@ if (CMAKE_CXX_COMPILE_FEATURES)
 
   add_definitions(-DEXPECT_OVERRIDE_CONTROL=1)
 
+  if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+      add_definitions(
+        -DEXPECT_INHERITING_CONSTRUCTORS=1
+        -DEXPECT_FINAL=1
+        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
+      )
+    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+      add_definitions(
+        -DEXPECT_INHERITING_CONSTRUCTORS=0
+        -DEXPECT_FINAL=1
+        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+      )
+    else()
+      add_definitions(
+        -DEXPECT_INHERITING_CONSTRUCTORS=0
+        -DEXPECT_FINAL=0
+        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+      )
+    endif()
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    add_definitions(
+      -DEXPECT_INHERITING_CONSTRUCTORS=1
+      -DEXPECT_FINAL=1
+      -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
+    )
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+      add_definitions(
+        -DEXPECT_INHERITING_CONSTRUCTORS=1
+        -DEXPECT_FINAL=1
+        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=1
+      )
+    else()
+      add_definitions(
+        -DEXPECT_INHERITING_CONSTRUCTORS=0
+        -DEXPECT_FINAL=1
+        -DEXPECT_INHERITING_CONSTRUCTORS_AND_FINAL=0
+      )
+    endif()
+  endif()
+
   add_executable(CompileFeaturesGenex genex_test.cpp)
   set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11)
   target_compile_definitions(CompileFeaturesGenex PRIVATE
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_NULLPTR=$<COMPILE_FEATURES:cxx_nullptr>
+    HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
+    HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+    HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
   )
 
   add_executable(CompileFeaturesGenex2 genex_test.cpp)
@@ -156,6 +201,9 @@ if (CMAKE_CXX_COMPILE_FEATURES)
   target_compile_definitions(CompileFeaturesGenex2 PRIVATE
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_NULLPTR=$<COMPILE_FEATURES:cxx_nullptr>
+    HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
+    HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+    HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
   )
 
   add_library(static_assert_iface INTERFACE)
@@ -165,5 +213,8 @@ if (CMAKE_CXX_COMPILE_FEATURES)
   target_compile_definitions(CompileFeaturesGenex3 PRIVATE
     HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>
     HAVE_NULLPTR=$<COMPILE_FEATURES:cxx_nullptr>
+    HAVE_INHERITING_CONSTRUCTORS=$<COMPILE_FEATURES:cxx_inheriting_constructors>
+    HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+    HAVE_INHERITING_CONSTRUCTORS_AND_FINAL=$<COMPILE_FEATURES:cxx_inheriting_constructors,cxx_final>
   )
 endif()
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index f667cc4..0389dbd 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -21,6 +21,36 @@ struct B final : A
 #error "Expect nullptr feature"
 #else
 
+#if !HAVE_INHERITING_CONSTRUCTORS
+#  if EXPECT_INHERITING_CONSTRUCTORS
+#    error Expect cxx_inheriting_constructors support
+#  endif
+#else
+#  if !EXPECT_INHERITING_CONSTRUCTORS
+#    error Expect no cxx_inheriting_constructors support
+#  endif
+#endif
+
+#if !HAVE_FINAL
+#  if EXPECT_FINAL
+#    error Expect cxx_final support
+#  endif
+#else
+#  if !EXPECT_FINAL
+#    error Expect no cxx_final support
+#  endif
+#endif
+
+#if !HAVE_INHERITING_CONSTRUCTORS_AND_FINAL
+#  if EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
+#    error Expect cxx_inheriting_constructors and cxx_final support
+#  endif
+#else
+#  if !EXPECT_INHERITING_CONSTRUCTORS_AND_FINAL
+#    error Expect no combined cxx_inheriting_constructors and cxx_final support
+#  endif
+#endif
+
 const char* getString()
 {
   return nullptr;

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

Summary of changes:
 Tests/CompileFeatures/CMakeLists.txt |   51 ++++++++++++++++++++++++++++++++++
 Tests/CompileFeatures/genex_test.cpp |   30 ++++++++++++++++++++
 2 files changed, 81 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list