summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-07-13 20:58:24 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-07-13 20:58:24 (GMT)
commit11d42b3e8f17c2b99838045545ae82df54a80b98 (patch)
treee246736fdb03f8c0dd3cff46e1067aa81b103a72 /Source/cmVisualStudioGeneratorOptions.cxx
parent724275b26651b06ac5757a68ec8b25a430f5fdc8 (diff)
downloadCMake-11d42b3e8f17c2b99838045545ae82df54a80b98.zip
CMake-11d42b3e8f17c2b99838045545ae82df54a80b98.tar.gz
CMake-11d42b3e8f17c2b99838045545ae82df54a80b98.tar.bz2
ENH: almost all tests passing in vs 10, commit fixes preprocess and starts vs external project
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx15
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, "&", "&amp;");
+ cmSystemTools::ReplaceString(ret, "<", "&lt;");
+ cmSystemTools::ReplaceString(ret, ">", "&gt;");
+ 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());
}