From 8750b1960e3ce5376198d4fe7a053f5605453b17 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 4 Oct 2006 11:33:07 -0400 Subject: BUG: fix for bug# 3664 --- Source/cmLocalVisualStudio7Generator.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 3901da4..91e5192 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1021,7 +1021,19 @@ void cmLocalVisualStudio7Generator::OutputDefineFlags(const char* flags, // 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 the define has something in it that is not a letter or a number + // then quote it + if(define. + find_first_not_of( + "-_abcdefghigklmnopqrstuvwxyz1234567890ABCDEFGHIGKLMNOPQRSTUVWXYZ") + != define.npos) + { + fout << """ << define << "","; + } + else + { + fout << define << ","; + } if(!done) { pos = defs.find("-D", nextpos); -- cgit v0.12