summaryrefslogtreecommitdiff
path: root/Tests/Complex
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-09 10:18:31 -0400
committerBrad King <brad.king@kitware.com>2007-05-09 10:18:31 -0400
commitadcd87c976eede8e76234550beb89ca082a00ade (patch)
treefaae266121f6b1ffeb2838a2c85318c79e4b516d /Tests/Complex
parente701ef77d8487c3cf348f24f86fdfd97661681ab (diff)
downloadcmake-adcd87c976eede8e76234550beb89ca082a00ade.tar.gz
BUG: Fixed cmLocalVisualStudio7Generator to deal with quotes in macro definitions properly. This addresses bug#4983.
Diffstat (limited to 'Tests/Complex')
-rw-r--r--Tests/Complex/Executable/CMakeLists.txt3
-rw-r--r--Tests/Complex/Executable/complex.cxx13
2 files changed, 15 insertions, 1 deletions
diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt
index 0c8a51de7f..d7245c4cae 100644
--- a/Tests/Complex/Executable/CMakeLists.txt
+++ b/Tests/Complex/Executable/CMakeLists.txt
@@ -87,7 +87,8 @@ ADD_CUSTOM_COMMAND(TARGET complex POST_BUILD
"${Complex_BINARY_DIR}/Executable/postbuild2.txt")
SET_SOURCE_FILES_PROPERTIES(complex
- COMPILE_FLAGS "-DFILE_HAS_EXTRA_COMPILE_FLAGS"
+ COMPILE_FLAGS
+ "-DFILE_HAS_EXTRA_COMPILE_FLAGS -DFILE_DEFINE_STRING=\\\"hello\\\""
OBJECT_DEPENDS ${Complex_BINARY_DIR}/cmTestGeneratedHeader.h
)
SET_TARGET_PROPERTIES(complex PROPERTIES COMPILE_FLAGS "-DCOMPLEX_TARGET_FLAG")
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index dee36ce573..c7c4ae5ea4 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -1139,6 +1139,19 @@ int main()
cmPassed("SET_SOURCE_FILES_PROPERTIES succeeded in setting FILE_HAS_EXTRA_COMPILE_FLAGS flag");
#endif
+#ifndef FILE_DEFINE_STRING
+ cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag");
+#else
+ if(strcmp(FILE_DEFINE_STRING, "hello") != 0)
+ {
+ cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting FILE_DEFINE_STRING flag correctly");
+ }
+ else
+ {
+ cmPassed("SET_SOURCE_FILES_PROPERTIES succeeded in setting FILE_DEFINE_STRING flag");
+ }
+#endif
+
#ifndef FILE_HAS_ABSTRACT
cmFailed("SET_SOURCE_FILES_PROPERTIES failed at setting ABSTRACT flag");
#else