summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-06-14 15:16:57 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-17 14:37:29 (GMT)
commit76b462eacba7fd66608a0956dbf89dab4457b8ba (patch)
treee47d84c3a2933cd5e288bb1a5e5daf6a56953936 /Source/cmExtraCodeBlocksGenerator.cxx
parent9d81f1b3aaa82d12a3a87067572b3ff5e2b9c4d2 (diff)
downloadCMake-76b462eacba7fd66608a0956dbf89dab4457b8ba.zip
CMake-76b462eacba7fd66608a0956dbf89dab4457b8ba.tar.gz
CMake-76b462eacba7fd66608a0956dbf89dab4457b8ba.tar.bz2
cmExtraCodeBlocksGenerator: Do not shuffle include directories
Report include directories in a sensible order. Do not shuffle them when trying to make them unique.
Diffstat (limited to 'Source/cmExtraCodeBlocksGenerator.cxx')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 2070b1f..589bf53 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -578,19 +578,20 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
}
// the include directories for this target
- std::set<std::string> uniqIncludeDirs;
+ std::vector<std::string> allIncludeDirs;
std::vector<std::string> includes;
lg->GetIncludeDirectories(includes, target, "C", buildType);
- uniqIncludeDirs.insert(includes.begin(), includes.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), includes.begin(),
+ includes.end());
std::string systemIncludeDirs = makefile->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
- uniqIncludeDirs.insert(dirs.begin(), dirs.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), dirs.begin(), dirs.end());
}
systemIncludeDirs = makefile->GetSafeDefinition(
@@ -598,13 +599,16 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
- uniqIncludeDirs.insert(dirs.begin(), dirs.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), dirs.begin(), dirs.end());
}
- for (std::set<std::string>::const_iterator dirIt = uniqIncludeDirs.begin();
- dirIt != uniqIncludeDirs.end(); ++dirIt) {
+ std::vector<std::string>::const_iterator end =
+ cmRemoveDuplicates(allIncludeDirs);
+
+ for (std::vector<std::string>::const_iterator i = allIncludeDirs.begin();
+ i != end; ++i) {
xml.StartElement("Add");
- xml.Attribute("directory", *dirIt);
+ xml.Attribute("directory", *i);
xml.EndElement();
}