Commit f3158e45 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

QtAutogen: Move GetCompileDefinitionsAndDirectories method.

parent 493b17f8
......@@ -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)
{
......
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