[cmake-commits] hoffman committed cmGlobalXCodeGenerator.cxx 1.134
1.135 cmXCodeObject.cxx 1.20 1.21
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Feb 21 14:01:22 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv10370
Modified Files:
cmGlobalXCodeGenerator.cxx cmXCodeObject.cxx
Log Message:
BUG: fix for quotes in strings for flags #4022
Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -d -r1.134 -r1.135
--- cmGlobalXCodeGenerator.cxx 20 Feb 2007 18:52:29 -0000 1.134
+++ cmGlobalXCodeGenerator.cxx 21 Feb 2007 19:01:19 -0000 1.135
@@ -1156,7 +1156,7 @@
{
buildSettings->AddAttribute
("GCC_PREPROCESSOR_DEFINITIONS",
- this->CreateString("CMAKE_INTDIR=\\\\\\\"$(CONFIGURATION)\\\\\\\""));
+ this->CreateString("CMAKE_INTDIR=\\\\\"$(CONFIGURATION)\\\\\""));
}
std::string extraLinkOptions;
if(target.GetType() == cmTarget::EXECUTABLE)
@@ -2565,9 +2565,9 @@
if(ret.find(' ') != ret.npos)
{
std::string t = ret;
- ret = "\\\"";
+ ret = "\"";
ret += t;
- ret += "\\\"";
+ ret += "\"";
}
return ret;
}
Index: cmXCodeObject.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmXCodeObject.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- cmXCodeObject.cxx 12 May 2006 18:36:39 -0000 1.20
+++ cmXCodeObject.cxx 21 Feb 2007 19:01:19 -0000 1.21
@@ -190,6 +190,8 @@
this->String = "\"\"";
return;
}
+ // escape quotes
+ cmSystemTools::ReplaceString(ss, "\"", "\\\"");
bool needQuote = false;
this->String = "";
if(ss.find_first_of(" <>.+-=") != ss.npos)
@@ -200,7 +202,7 @@
{
this->String = "\"";
}
- this->String += s;
+ this->String += ss;
if(needQuote)
{
this->String += "\"";
More information about the Cmake-commits
mailing list