summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-10-03 18:33:35 (GMT)
committerBrad King <brad.king@kitware.com>2005-10-03 18:33:35 (GMT)
commitb9e088dcfa4f7e075b809914a95dfa465f00617a (patch)
tree2e174100bafc477d746a374f31b195649abd684b /Source
parenta1188cef3b8d3eff0c4394c64b2d7dae70c776f2 (diff)
downloadCMake-b9e088dcfa4f7e075b809914a95dfa465f00617a.zip
CMake-b9e088dcfa4f7e075b809914a95dfa465f00617a.tar.gz
CMake-b9e088dcfa4f7e075b809914a95dfa465f00617a.tar.bz2
BUG: Double-quotes in definitions must be escaped.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 27cd856..493eb81 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -946,8 +946,11 @@ void cmLocalVisualStudio7Generator::OutputDefineFlags(const char* flags,
done = true;
}
- cmSystemTools::ReplaceString(define, "\"", "&quot;");
- fout << define << ",";
+ // 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.
+ cmSystemTools::ReplaceString(define, "\"", "\\&quot;");
+ fout << "&quot;" << define << "&quot;,";
if(!done)
{
pos = defs.find("-D", nextpos);