summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-09-02 14:27:15 (GMT)
committerBrad King <brad.king@kitware.com>2008-09-02 14:27:15 (GMT)
commit698b8044a627293dd6a453c2fa10284000b2f5b1 (patch)
treed285499547a628d8861dc91bec4e4b9520f450c1 /Source/cmGlobalXCodeGenerator.cxx
parent6eea886474541c7cee58a24a6432d12e598f3f28 (diff)
downloadCMake-698b8044a627293dd6a453c2fa10284000b2f5b1.zip
CMake-698b8044a627293dd6a453c2fa10284000b2f5b1.tar.gz
CMake-698b8044a627293dd6a453c2fa10284000b2f5b1.tar.bz2
ENH: Simplify string attributes in Xcode generator
This change cleans up the implementation of cmXCodeObject to avoid un-escaping and re-escaping string values. There is no need to store the string in escaped form. It can be escaped once when it is printed out to the generated project file.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 4ca55c5..2e00d13 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -689,7 +689,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
cmTarget::SourceFileFlags tsFlags =
cmtarget.GetTargetSourceFileFlags(*i);
- if(strcmp(filetype->GetString(), "\"compiled.mach-o.objfile\"") == 0)
+ if(strcmp(filetype->GetString(), "compiled.mach-o.objfile") == 0)
{
externalObjFiles.push_back(xsf);
}
@@ -1957,22 +1957,8 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings,
else
{
std::string oldValue = attr->GetString();
-
- // unescape escaped quotes internal to the string:
- cmSystemTools::ReplaceString(oldValue, "\\\"", "\"");
-
- // remove surrounding quotes, if any:
- std::string::size_type len = oldValue.length();
- if(oldValue[0] == '\"' && oldValue[len-1] == '\"')
- {
- oldValue = oldValue.substr(1, len-2);
- }
-
oldValue += " ";
oldValue += value;
-
- // SetString automatically escapes internal quotes and then surrounds
- // the result with quotes if necessary...
attr->SetString(oldValue.c_str());
}
}