summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-10-04 15:33:07 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-10-04 15:33:07 (GMT)
commit8750b1960e3ce5376198d4fe7a053f5605453b17 (patch)
treeadb3d9d886c97e60b323f3359acdcb314f4e9f6b /Source/cmLocalVisualStudio7Generator.cxx
parent4f304e7a07c803f2b4396f94a9f38efb32f080aa (diff)
downloadCMake-8750b1960e3ce5376198d4fe7a053f5605453b17.zip
CMake-8750b1960e3ce5376198d4fe7a053f5605453b17.tar.gz
CMake-8750b1960e3ce5376198d4fe7a053f5605453b17.tar.bz2
BUG: fix for bug# 3664
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx14
1 files changed, 13 insertions, 1 deletions
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, "\"", "\\&quot;");
- fout << "&quot;" << define << "&quot;,";
+ // 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 << "&quot;" << define << "&quot;,";
+ }
+ else
+ {
+ fout << define << ",";
+ }
if(!done)
{
pos = defs.find("-D", nextpos);