From b9e088dcfa4f7e075b809914a95dfa465f00617a Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 3 Oct 2005 14:33:35 -0400 Subject: BUG: Double-quotes in definitions must be escaped. --- Source/cmLocalVisualStudio7Generator.cxx | 7 +++++-- 1 file 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, "\"", """); - 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, "\"", "\\""); + fout << """ << define << "","; if(!done) { pos = defs.find("-D", nextpos); -- cgit v0.12