[Cmake-commits] CMake branch, next, updated. v2.8.11-2270-g7528126
Stephen Kelly
steveire at gmail.com
Tue May 28 12:30:27 EDT 2013
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 752812651f32dc7b0f65fadc6143e7c56dc68558 (commit)
via 632912c3d7d8f59f8bd729d75976eaa18f3615d1 (commit)
from fcf8945a22a0790e738a3adf4e385570f437b7c7 (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=752812651f32dc7b0f65fadc6143e7c56dc68558
commit 752812651f32dc7b0f65fadc6143e7c56dc68558
Merge: fcf8945 632912c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 28 12:30:20 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 28 12:30:20 2013 -0400
Merge topic 'target-COMPILE_OPTIONS' into next
632912c Only run the GNU compiler tests when using that compiler.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=632912c3d7d8f59f8bd729d75976eaa18f3615d1
commit 632912c3d7d8f59f8bd729d75976eaa18f3615d1
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue May 28 18:29:23 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Tue May 28 18:29:44 2013 +0200
Only run the GNU compiler tests when using that compiler.
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 59f1f91..06a48fb 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -12,6 +12,13 @@ target_compile_options(target_compile_options
INTERFACE $<$<CXX_COMPILER_ID:GNU>:-DMY_INTERFACE_DEFINE>
)
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_compile_definitions(target_compile_options
+ PRIVATE
+ "DO_GNU_TESTS"
+ )
+endif()
+
add_executable(consumer
"${CMAKE_CURRENT_SOURCE_DIR}/consumer.cpp"
)
@@ -19,3 +26,10 @@ add_executable(consumer
target_compile_options(consumer
PRIVATE $<$<CXX_COMPILER_ID:GNU>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
)
+
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ target_compile_definitions(consumer
+ PRIVATE
+ "DO_GNU_TESTS"
+ )
+endif()
diff --git a/Tests/CMakeCommands/target_compile_options/consumer.cpp b/Tests/CMakeCommands/target_compile_options/consumer.cpp
index 1178e74..1299606 100644
--- a/Tests/CMakeCommands/target_compile_options/consumer.cpp
+++ b/Tests/CMakeCommands/target_compile_options/consumer.cpp
@@ -1,14 +1,18 @@
-#ifdef MY_PRIVATE_DEFINE
-#error Unexpected MY_PRIVATE_DEFINE
-#endif
+#ifdef DO_GNU_TESTS
-#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
-#endif
+# ifdef MY_PRIVATE_DEFINE
+# error Unexpected MY_PRIVATE_DEFINE
+# endif
+
+# ifndef MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
+# endif
+
+# ifndef MY_INTERFACE_DEFINE
+# error Expected MY_INTERFACE_DEFINE
+# endif
-#ifndef MY_INTERFACE_DEFINE
-#error Expected MY_INTERFACE_DEFINE
#endif
int main() { return 0; }
diff --git a/Tests/CMakeCommands/target_compile_options/main.cpp b/Tests/CMakeCommands/target_compile_options/main.cpp
index addb33c..961c06d 100644
--- a/Tests/CMakeCommands/target_compile_options/main.cpp
+++ b/Tests/CMakeCommands/target_compile_options/main.cpp
@@ -1,14 +1,18 @@
-#ifndef MY_PRIVATE_DEFINE
-#error Expected MY_PRIVATE_DEFINE
-#endif
+#ifdef DO_GNU_TESTS
-#ifndef MY_PUBLIC_DEFINE
-#error Expected MY_PUBLIC_DEFINE
-#endif
+# ifndef MY_PRIVATE_DEFINE
+# error Expected MY_PRIVATE_DEFINE
+# endif
+
+# ifndef MY_PUBLIC_DEFINE
+# error Expected MY_PUBLIC_DEFINE
+# endif
+
+# ifdef MY_INTERFACE_DEFINE
+# error Unexpected MY_INTERFACE_DEFINE
+# endif
-#ifdef MY_INTERFACE_DEFINE
-#error Unexpected MY_INTERFACE_DEFINE
#endif
int main() { return 0; }
-----------------------------------------------------------------------
Summary of changes:
.../target_compile_options/CMakeLists.txt | 14 ++++++++++++++
.../target_compile_options/consumer.cpp | 20 ++++++++++++--------
.../CMakeCommands/target_compile_options/main.cpp | 20 ++++++++++++--------
3 files changed, 38 insertions(+), 16 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list