[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3146-g0b9d3bf

Stephen Kelly steveire at gmail.com
Tue Jul 16 04:32:53 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  0b9d3bf2f02f43bcbb563acf13370a27a34fb6db (commit)
       via  4ae67d2369f0c2d742de4ef7d69766824dd123e6 (commit)
       via  029e836a212b1069bda38ec09fe6614c68b12cc5 (commit)
      from  ce30629c46948c0670c36d7819c445e3e27c7659 (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=0b9d3bf2f02f43bcbb563acf13370a27a34fb6db
commit 0b9d3bf2f02f43bcbb563acf13370a27a34fb6db
Merge: ce30629 4ae67d2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jul 16 04:32:50 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 16 04:32:50 2013 -0400

    Merge topic 'compile-defs-debugging' into next
    
    4ae67d2 Copy the semicolon test from the Preprocess test to CompileDefinitions.
    029e836 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ae67d2369f0c2d742de4ef7d69766824dd123e6
commit 4ae67d2369f0c2d742de4ef7d69766824dd123e6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jul 16 10:26:59 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jul 16 10:32:15 2013 +0200

    Copy the semicolon test from the Preprocess test to CompileDefinitions.
    
    Although this is duplication, it makes sense to test this with the
    rest of the compile defintions related tests anyway.

diff --git a/Tests/CompileDefinitions/CMakeLists.txt b/Tests/CompileDefinitions/CMakeLists.txt
index 930d220..21527b4 100644
--- a/Tests/CompileDefinitions/CMakeLists.txt
+++ b/Tests/CompileDefinitions/CMakeLists.txt
@@ -24,3 +24,32 @@ add_subdirectory(target_prop)
 add_subdirectory(add_definitions_command_with_target_prop)
 
 add_executable(CompileDefinitions runtest.c)
+
+if(NOT BORLAND AND NOT PP_VS70)
+  # Borland, VS70 IDE: ;
+  # The Borland compiler will simply not accept a non-escaped semicolon
+  # on the command line.  If it is escaped \; then the escape character
+  # shows up in the preprocessing output too.
+  #
+  # The VS 7.0 IDE separates definitions on semicolons and commas with
+  # no regard for quotes.  Fortunately VS 7.1 and above are okay.
+  set(SEMICOLON "\;")
+endif()
+
+set_property(
+  TARGET CompileDefinitions
+  APPEND PROPERTY COMPILE_DEFINITIONS
+  "SEMICOLON_STRING1=\"foo${SEMICOLON}bar\""
+  )
+target_compile_definitions(CompileDefinitions PRIVATE
+  "SEMICOLON_STRING2=\"foo${SEMICOLON}bar\""
+)
+add_definitions("-DSEMICOLON_STRING3=\"foo${SEMICOLON}bar\"")
+
+if (SEMICOLON)
+  set_property(
+    TARGET CompileDefinitions
+    APPEND PROPERTY COMPILE_DEFINITIONS
+    TEST_SEMICOLON
+  )
+endif()
diff --git a/Tests/CompileDefinitions/runtest.c b/Tests/CompileDefinitions/runtest.c
index 02d2cad..66279f2 100644
--- a/Tests/CompileDefinitions/runtest.c
+++ b/Tests/CompileDefinitions/runtest.c
@@ -43,5 +43,14 @@ int main()
     return 1;
     }
 #endif
+#ifdef TEST_SEMICOLON
+  if(strcmp(SEMICOLON_STRING1, "foo;bar") != 0
+      || strcmp(SEMICOLON_STRING2, "foo;bar") != 0
+      || strcmp(SEMICOLON_STRING3, "foo;bar") != 0)
+    {
+    fprintf(stderr, "SEMICOLON_STRING is not \"foo;bar\"\n");
+    return 1;
+    }
+#endif
   return 0;
 }

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

Summary of changes:
 Source/CMakeVersion.cmake               |    2 +-
 Tests/CompileDefinitions/CMakeLists.txt |   29 +++++++++++++++++++++++++++++
 Tests/CompileDefinitions/runtest.c      |    9 +++++++++
 3 files changed, 39 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list