Merge topic 'automoc-append-implicit-dirs'
753b905
Automoc: append implicit includes after user-specified dirs
This commit is contained in:
commit
3efede0ccc
|
@ -1407,20 +1407,22 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
|
|||
return;
|
||||
}
|
||||
|
||||
if (stripImplicitInclDirs)
|
||||
std::vector<std::string> implicitDirs;
|
||||
// Load implicit include directories for this language.
|
||||
std::string impDirVar = "CMAKE_";
|
||||
impDirVar += lang;
|
||||
impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES";
|
||||
if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str()))
|
||||
{
|
||||
// Load implicit include directories for this language.
|
||||
std::string impDirVar = "CMAKE_";
|
||||
impDirVar += lang;
|
||||
impDirVar += "_IMPLICIT_INCLUDE_DIRECTORIES";
|
||||
if(const char* value = this->Makefile->GetDefinition(impDirVar.c_str()))
|
||||
std::vector<std::string> impDirVec;
|
||||
cmSystemTools::ExpandListArgument(value, impDirVec);
|
||||
for(std::vector<std::string>::const_iterator i = impDirVec.begin();
|
||||
i != impDirVec.end(); ++i)
|
||||
{
|
||||
std::vector<std::string> impDirVec;
|
||||
cmSystemTools::ExpandListArgument(value, impDirVec);
|
||||
for(std::vector<std::string>::const_iterator i = impDirVec.begin();
|
||||
i != impDirVec.end(); ++i)
|
||||
emitted.insert(*i);
|
||||
if (!stripImplicitInclDirs)
|
||||
{
|
||||
emitted.insert(*i);
|
||||
implicitDirs.push_back(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1463,6 +1465,15 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs,
|
|||
dirs.push_back(*i);
|
||||
}
|
||||
}
|
||||
|
||||
for(std::vector<std::string>::const_iterator i = implicitDirs.begin();
|
||||
i != implicitDirs.end(); ++i)
|
||||
{
|
||||
if(std::find(includes.begin(), includes.end(), *i) != includes.end())
|
||||
{
|
||||
dirs.push_back(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
||||
|
|
Loading…
Reference in New Issue