diff options
author | Brad King <brad.king@kitware.com> | 2016-06-17 14:40:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 14:40:14 (GMT) |
commit | 3a50c55ff6f0ad2f06d52f30fa8d1bcdef0c0730 (patch) | |
tree | 1112d20d93909f825ad2c0491dd4a5b0d76e1ecc | |
parent | 4160d68189c83da60156a3a65edbd322dca0fa90 (diff) | |
parent | 76b462eacba7fd66608a0956dbf89dab4457b8ba (diff) | |
download | CMake-3a50c55ff6f0ad2f06d52f30fa8d1bcdef0c0730.zip CMake-3a50c55ff6f0ad2f06d52f30fa8d1bcdef0c0730.tar.gz CMake-3a50c55ff6f0ad2f06d52f30fa8d1bcdef0c0730.tar.bz2 |
Merge branch 'CodeBlocks-include-order' into release
-rw-r--r-- | Source/cmExtraCodeBlocksGenerator.cxx | 18 |
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(); } |