[cmake-commits] king committed cmLocalVisualStudio7Generator.cxx
1.188 1.189
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed May 9 10:18:33 EDT 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24559/Source
Modified Files:
cmLocalVisualStudio7Generator.cxx
Log Message:
BUG: Fixed cmLocalVisualStudio7Generator to deal with quotes in macro definitions properly. This addresses bug#4983.
Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- cmLocalVisualStudio7Generator.cxx 9 May 2007 12:25:45 -0000 1.188
+++ cmLocalVisualStudio7Generator.cxx 9 May 2007 14:18:31 -0000 1.189
@@ -502,9 +502,9 @@
this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"));
// Add a definition for the configuration name.
- std::string configDefine = "CMAKE_INTDIR=\\\"";
+ std::string configDefine = "CMAKE_INTDIR=\"";
configDefine += configName;
- configDefine += "\\\"";
+ configDefine += "\"";
targetOptions.AddDefine(configDefine);
// Add the export symbol definition for shared library objects.
@@ -1836,14 +1836,13 @@
for(std::vector<cmStdString>::const_iterator di = this->Defines.begin();
di != this->Defines.end(); ++di)
{
- // Escape this flag for the IDE.
- std::string define =
- cmLocalVisualStudio7GeneratorEscapeForXML(di->c_str());
-
- // Old comment:
// Double-quotes in the value of the definition must be escaped
- // with a backslash. The entire definition should be quoted in
- // the generated xml attribute to avoid confusing the VS parser.
+ // with a backslash.
+ std::string define = di->c_str();
+ cmSystemTools::ReplaceString(define, "\"", "\\\"");
+
+ // Escape this flag for the IDE.
+ define = cmLocalVisualStudio7GeneratorEscapeForXML(define.c_str());
// Write this flag. Quote it if the definition is not
// alphanumeric.
More information about the Cmake-commits
mailing list