Browse Source

Merge topic 'CodeBlocks-quoting'

240d39a Fix XML safety issue with adding preprocessor defines in CodeBlocks project.
David Cole 14 năm trước cách đây
mục cha
commit
296fde32dd
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      Source/cmExtraCodeBlocksGenerator.cxx

+ 3 - 1
Source/cmExtraCodeBlocksGenerator.cxx

@@ -19,6 +19,7 @@
 #include "cmGeneratedFileStream.h"
 #include "cmTarget.h"
 #include "cmSystemTools.h"
+#include "cmXMLSafe.h"
 
 #include <cmsys/SystemTools.hxx>
 
@@ -592,7 +593,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";
         }
       }