QtAutogen: Move GetCompileDefinitionsAndDirectories method.

This commit is contained in:
Stephen Kelly 2015-10-05 18:46:11 +02:00
parent 493b17f8c7
commit f3158e45b8
1 changed files with 22 additions and 22 deletions

View File

@ -108,6 +108,28 @@ void cmQtAutoGeneratorInitializer::SetupSourceFiles(cmTarget const* target,
}
}
static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
const std::string& config,
std::string &incs,
std::string &defs)
{
cmMakefile* makefile = target->GetMakefile();
cmGlobalGenerator* globalGen = makefile->GetGlobalGenerator();
std::vector<std::string> includeDirs;
cmGeneratorTarget *gtgt = globalGen->GetGeneratorTarget(target);
cmLocalGenerator *localGen = gtgt->GetLocalGenerator();
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);
incs = cmJoin(includeDirs, ";");
std::set<std::string> defines;
localGen->AddCompileDefinitions(defines, target, config, "CXX");
defs += cmJoin(defines, ";");
}
std::string cmQtAutoGeneratorInitializer::GetAutogenTargetName(
cmTarget const* target)
{
@ -489,28 +511,6 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
}
}
static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
const std::string& config,
std::string &incs,
std::string &defs)
{
cmMakefile* makefile = target->GetMakefile();
cmGlobalGenerator* globalGen = makefile->GetGlobalGenerator();
std::vector<std::string> includeDirs;
cmGeneratorTarget *gtgt = globalGen->GetGeneratorTarget(target);
cmLocalGenerator *localGen = gtgt->GetLocalGenerator();
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);
incs = cmJoin(includeDirs, ";");
std::set<std::string> defines;
localGen->AddCompileDefinitions(defines, target, config, "CXX");
defs += cmJoin(defines, ";");
}
void cmQtAutoGeneratorInitializer::SetupAutoGenerateTarget(
cmTarget const* target)
{