summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2011-10-05 16:02:32 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2011-10-05 16:02:32 (GMT)
commit240d39a6a4f72fe0e45fc1a1403e0b578d36a142 (patch)
treeae4df23c0682f5195c8aad586a7199a0f465ddfb /Source
parenta5683f80bdc1c8c78d8db47f5695e0be3cc19afe (diff)
downloadCMake-240d39a6a4f72fe0e45fc1a1403e0b578d36a142.zip
CMake-240d39a6a4f72fe0e45fc1a1403e0b578d36a142.tar.gz
CMake-240d39a6a4f72fe0e45fc1a1403e0b578d36a142.tar.bz2
Fix XML safety issue with adding preprocessor defines in CodeBlocks project.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 7db91c7..9a0b1ea 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -19,6 +19,7 @@
#include "cmGeneratedFileStream.h"
#include "cmTarget.h"
#include "cmSystemTools.h"
+#include "cmXMLSafe.h"
#include <cmsys/SystemTools.hxx>
@@ -585,7 +586,8 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
for(std::vector<std::string>::const_iterator di = defs.begin();
di != defs.end(); ++di)
{
- fout <<" <Add option=\"-D" << di->c_str() << "\" />\n";
+ cmXMLSafe safedef(di->c_str());
+ fout <<" <Add option=\"-D" << safedef.str() << "\" />\n";
}
}