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 2548e1368baff7cb1dc1c1296d5e4c6f89516ac2 (commit) via 3d8aabf414b21a10161aa60179f484cc63860cfe (commit) from 250dd777fb6b240ab9377c11643483d266d1b88e (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=2548e1368baff7cb1dc1c1296d5e4c6f89516ac2 commit 2548e1368baff7cb1dc1c1296d5e4c6f89516ac2 Merge: 250dd77 3d8aabf Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Jul 16 09:27:08 2013 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Jul 16 09:27:08 2013 -0400 Merge topic 'compile-defs-debugging' into next 3d8aabf Copy the semicolon test from the Preprocess test to CompileDefinitions. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8aabf414b21a10161aa60179f484cc63860cfe commit 3d8aabf414b21a10161aa60179f484cc63860cfe 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 15:26:27 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/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