Commit 2e9199b2 authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

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.
parent 264012da
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment