[Cmake-commits] CMake branch, next, updated. v3.1.0-1807-g258b54b
Stephen Kelly
steveire at gmail.com
Mon Jan 12 14:06:30 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 258b54be2e083734d08962b84ee30b4e83f02e9f (commit)
via 4eb34e13fe4c24ac34330b1926fa045078389070 (commit)
via 6f6d630f4aadffa5320381e92fb79a0ed52e177b (commit)
from 5ae13355efec27b1acb6e65bd411bb2c012fb952 (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=258b54be2e083734d08962b84ee30b4e83f02e9f
commit 258b54be2e083734d08962b84ee30b4e83f02e9f
Merge: 5ae1335 4eb34e1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 12 14:06:29 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 12 14:06:29 2015 -0500
Merge topic 'extend-COMPILE_FEATURES-test' into next
4eb34e13 Features: Extend the tests for the COMPILE_FEATURES genex.
6f6d630f Merge remote-tracking branch 'origin/fix-COMPILE_FEATURES-genex' into HEAD
diff --cc Tests/CompileFeatures/CMakeLists.txt
index f0a4e74,80f16d6..58a5f2a
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@@ -218,6 -223,8 +273,9 @@@ 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_THREAD_LOCAL=$<COMPILE_FEATURES:cxx_thread_local>
+ HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+ HAVE_THREAD_LOCAL_AND_FINAL=$<COMPILE_FEATURES:cxx_thread_local,cxx_final>
)
+
endif()
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4eb34e13fe4c24ac34330b1926fa045078389070
commit 4eb34e13fe4c24ac34330b1926fa045078389070
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 12 20:02:17 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 12 20:04:06 2015 +0100
Features: Extend the tests for the COMPILE_FEATURES genex.
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 9fb8d1b..80f16d6 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -146,12 +146,64 @@ 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_THREAD_LOCAL=1
+ -DEXPECT_FINAL=1
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=1
+ )
+ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=0
+ -DEXPECT_FINAL=1
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=0
+ )
+ else()
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=0
+ -DEXPECT_FINAL=0
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=0
+ )
+ endif()
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=1
+ -DEXPECT_FINAL=1
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=1
+ )
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1900)
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=1
+ -DEXPECT_FINAL=1
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=1
+ )
+ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1700)
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=0
+ -DEXPECT_FINAL=1
+ -DEXPECT_THREAD_LOCAL_AND_FINAL=0
+ )
+ else()
+ add_definitions(
+ -DEXPECT_THREAD_LOCAL=0
+ -DEXPECT_FINAL=0
+ -DEXPECT_THREAD_LOCAL_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_THREAD_LOCAL=$<COMPILE_FEATURES:cxx_thread_local>
+ HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+ HAVE_THREAD_LOCAL_AND_FINAL=$<COMPILE_FEATURES:cxx_thread_local,cxx_final>
)
add_executable(CompileFeaturesGenex2 genex_test.cpp)
@@ -159,6 +211,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_THREAD_LOCAL=$<COMPILE_FEATURES:cxx_thread_local>
+ HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+ HAVE_THREAD_LOCAL_AND_FINAL=$<COMPILE_FEATURES:cxx_thread_local,cxx_final>
)
add_library(static_assert_iface INTERFACE)
@@ -168,5 +223,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_THREAD_LOCAL=$<COMPILE_FEATURES:cxx_thread_local>
+ HAVE_FINAL=$<COMPILE_FEATURES:cxx_final>
+ HAVE_THREAD_LOCAL_AND_FINAL=$<COMPILE_FEATURES:cxx_thread_local,cxx_final>
)
endif()
diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp
index 4412569..c56d764 100644
--- a/Tests/CompileFeatures/genex_test.cpp
+++ b/Tests/CompileFeatures/genex_test.cpp
@@ -21,6 +21,36 @@ struct B : A
#error "Expect nullptr feature"
#else
+#if !HAVE_THREAD_LOCAL
+# if EXPECT_THREAD_LOCAL
+# error Expect cxx_thread_local support
+# endif
+#else
+# if !EXPECT_THREAD_LOCAL
+# error Expect no cxx_thread_local 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_THREAD_LOCAL_AND_FINAL
+# if EXPECT_THREAD_LOCAL_AND_FINAL
+# error Expect cxx_thread_local and cxx_final support
+# endif
+#else
+# if !EXPECT_THREAD_LOCAL_AND_FINAL
+# error Expect no combined cxx_thread_local and cxx_final support
+# endif
+#endif
+
const char* getString()
{
return nullptr;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f6d630f4aadffa5320381e92fb79a0ed52e177b
commit 6f6d630f4aadffa5320381e92fb79a0ed52e177b
Merge: 3dec4a2 45ec182
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jan 12 20:03:47 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jan 12 20:03:47 2015 +0100
Merge remote-tracking branch 'origin/fix-COMPILE_FEATURES-genex' into HEAD
-----------------------------------------------------------------------
Summary of changes:
Tests/CompileFeatures/CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++++
Tests/CompileFeatures/genex_test.cpp | 30 ++++++++++++++++++
2 files changed, 88 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list