summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-07-30 07:18:13 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-07-30 07:22:46 (GMT)
commit2e9199b291879d9a47759faa178fb2f35b12bd64 (patch)
tree8a69ed6af1f87e6085063095c35c15a0f212c14c
parent264012dae0cdefac1c7f152ce6aefe5bb0dddf40 (diff)
downloadCMake-2e9199b291879d9a47759faa178fb2f35b12bd64.zip
CMake-2e9199b291879d9a47759faa178fb2f35b12bd64.tar.gz
CMake-2e9199b291879d9a47759faa178fb2f35b12bd64.tar.bz2
cmLocalGenerator: Respect user requested implicit include directories order
In ``cmLocalGenerator::GetIncludeDirectories`` append the user requested implicit include directories first, then append the remaining implicit include directories. By By doing so we keep the user requested order of implicit include directories.
-rw-r--r--Source/cmLocalGenerator.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 647697a..a669477 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -960,15 +960,14 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
}
if (!stripImplicitDirs) {
- if (!appendAllImplicitDirs) {
- // Append only those implicit directories that were requested by the user
- for (std::string const& i : implicitDirs) {
- if (std::find(userDirs.begin(), userDirs.end(), i) != userDirs.end()) {
- dirs.push_back(i);
- }
+ // Append only implicit directories that were requested by the user
+ for (std::string const& i : implicitDirs) {
+ if (std::find(userDirs.begin(), userDirs.end(), i) != userDirs.end()) {
+ dirs.push_back(i);
}
- } else {
- // Append all implicit directories
+ }
+ // Append remaining implicit directories on demand
+ if (appendAllImplicitDirs) {
for (std::string const& i : implicitDirs) {
if (std::find(dirs.begin(), dirs.end(), i) == dirs.end()) {
dirs.push_back(i);