summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalXCodeGenerator.cxx
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 /Source/cmLocalXCodeGenerator.cxx
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 'Source/cmLocalXCodeGenerator.cxx')
-rw-r--r--Source/cmLocalXCodeGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index 551ebd3..7c5f69d 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -33,3 +33,12 @@ cmLocalXCodeGenerator::GetTargetDirectory(cmTarget const&) const
// No per-target directory for this generator (yet).
return "";
}
+
+//----------------------------------------------------------------------------
+void cmLocalXCodeGenerator::AppendFlagEscape(std::string& flags,
+ const char* rawFlag)
+{
+ cmGlobalXCodeGenerator* gg =
+ static_cast<cmGlobalXCodeGenerator*>(this->GlobalGenerator);
+ gg->AppendFlag(flags, rawFlag);
+}