summaryrefslogtreecommitdiff
path: root/dev-util/cmake/files/cmake-2.8.6-CodeBlocks.patch
blob: 8a8fe6f392a8f58ef231cb53f504fe7100b97e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 240d39a6a4f72fe0e45fc1a1403e0b578d36a142 Mon Sep 17 00:00:00 2001
From: Clinton Stimpson <clinton@elemtech.com>
Date: Wed, 5 Oct 2011 10:02:32 -0600
Subject: [PATCH] Fix XML safety issue with adding preprocessor defines in CodeBlocks project.

---
 Source/cmExtraCodeBlocksGenerator.cxx |    4 +++-
 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";
         }
       }
 
-- 
1.7.0