summaryrefslogtreecommitdiffstats
path: root/Tests/CompileOptions/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-27 15:49:06 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-27 16:57:32 (GMT)
commitb6385cabec5356b471dc37bd999d1803555ba386 (patch)
tree2a9c20152cfc72e9a74fffa97078437f98df05a8 /Tests/CompileOptions/CMakeLists.txt
parent0c9cc9a0775da100c9744c388bae724acbe34034 (diff)
downloadCMake-b6385cabec5356b471dc37bd999d1803555ba386.zip
CMake-b6385cabec5356b471dc37bd999d1803555ba386.tar.gz
CMake-b6385cabec5356b471dc37bd999d1803555ba386.tar.bz2
Escape target flags taken from COMPILE_OPTIONS
Factor appending of individual flags out into an AppendFlagEscape method in cmLocalGenerator and teach it to use EscapeForShell. Update all COMPILE_OPTIONS handling to use AppendFlagEscape. Override the method in the Xcode generator to use its custom escape implementation. Teach the CompileOptions test to add an option that requires escaping everywhere instead of just with the GNU tools.
Diffstat (limited to 'Tests/CompileOptions/CMakeLists.txt')
-rw-r--r--Tests/CompileOptions/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 6d8a96a..52c3759 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -5,7 +5,11 @@ project(CompileOptions)
add_library(testlib other.cpp)
add_executable(CompileOptions main.cpp)
-set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE>")
+set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
+ "-DTEST_DEFINE"
+ "-DNEEDS_ESCAPE=\"E$CAPE\""
+ "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE_GNU>"
+ )
target_link_libraries(CompileOptions testlib)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")