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  e715845e8bde526f432a92cb302a283401cf4d12 (commit)
       via  978b663f1ddcfd8868822038566d206874e62a63 (commit)
      from  041b20f9dfc7843f7fbcd7846688db4f450c52a8 (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=e715845e8bde526f432a92cb302a283401cf4d12
commit e715845e8bde526f432a92cb302a283401cf4d12
Merge: 041b20f 978b663
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Jul 16 10:02:31 2013 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Jul 16 10:02:31 2013 -0400

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


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=978b663f1ddcfd8868822038566d206874e62a63
commit 978b663f1ddcfd8868822038566d206874e62a63
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Jul 16 10:26:59 2013 +0200
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Tue Jul 16 16:02:04 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..12bb835 100644
--- a/Tests/CompileDefinitions/CMakeLists.txt
+++ b/Tests/CompileDefinitions/CMakeLists.txt
@@ -24,3 +24,46 @@ 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\"")
+
+add_library(emptyTarget empty.cpp)
+set_property(
+  TARGET emptyTarget
+  APPEND PROPERTY COMPILE_DEFINITIONS
+  "SEMICOLON_STRING4=\"foo${SEMICOLON}bar\""
+  )
+
+get_target_property(_roundtrip emptyTarget COMPILE_DEFINITIONS)
+set_property(
+  TARGET CompileDefinitions
+  APPEND PROPERTY COMPILE_DEFINITIONS
+  "${_roundtrip}"
+  )
+
+if (SEMICOLON)
+  set_property(
+    TARGET CompileDefinitions
+    APPEND PROPERTY COMPILE_DEFINITIONS
+    TEST_SEMICOLON
+  )
+endif()
diff --git a/Tests/CompileDefinitions/empty.cpp 
b/Tests/CompileDefinitions/empty.cpp
new file mode 100644
index 0000000..1787013
--- /dev/null
+++ b/Tests/CompileDefinitions/empty.cpp
@@ -0,0 +1,4 @@
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+int empty() { return 0; }
diff --git a/Tests/CompileDefinitions/runtest.c 
b/Tests/CompileDefinitions/runtest.c
index 02d2cad..9a236e9 100644
--- a/Tests/CompileDefinitions/runtest.c
+++ b/Tests/CompileDefinitions/runtest.c
@@ -43,5 +43,15 @@ 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
+      || strcmp(SEMICOLON_STRING4, "foo;bar") != 0)
+    {
+    fprintf(stderr, "SEMICOLON_STRING is not \"foo;bar\"\n");
+    return 1;
+    }
+#endif
   return 0;
 }

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

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to