diff options
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 179dc5b..7a57d90 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -3,6 +3,15 @@ #include <cmsys/System.h> #include "cmVisualStudio10TargetGenerator.h" +inline std::string cmVisualStudio10GeneratorOptionsEscapeForXML(const char* s) +{ + std::string ret = s; + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); + return ret; +} + inline std::string cmVisualStudioGeneratorOptionsEscapeForXML(const char* s) { std::string ret = s; @@ -321,7 +330,11 @@ cmVisualStudioGeneratorOptions define = *di; } // Escape this flag for the IDE. - if(this->Version != 10) + if(this->Version == 10) + { + define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str()); + } + else { define = cmVisualStudioGeneratorOptionsEscapeForXML(define.c_str()); } |