[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3150-g9cd5e74

Stephen Kelly steveire at gmail.com
Tue Jul 16 05:48:54 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  9cd5e74a6064bab92d0e8315feda17b85a15eb56 (commit)
       via  9c479bc03a8e8e213fd763b26987f2408f192213 (commit)
      from  591e2043dbeb45e61bbde2d8b0d8763ef1deda9e (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=9cd5e74a6064bab92d0e8315feda17b85a15eb56
commit 9cd5e74a6064bab92d0e8315feda17b85a15eb56
Merge: 591e204 9c479bc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jul 16 05:48:52 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 16 05:48:52 2013 -0400

    Merge topic 'compile-defs-debugging' into next
    
    9c479bc Copy the semicolon test from the Preprocess test to CompileDefinitions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c479bc03a8e8e213fd763b26987f2408f192213
commit 9c479bc03a8e8e213fd763b26987f2408f192213
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 11:48:30 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..3e1d4e7 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 "${CMAKE_GENERATOR}" MATCHES "Visual Studio 7$")
+  # 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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list