diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-05 16:46:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-05 16:46:11 (GMT) |
commit | f3158e45b8fde882603e1d9b2262a5c64e25c1ee (patch) | |
tree | 799b692d7d068dcc3a12498edbf1d37a735299ce /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 493b17f8c7fb171fd7ca36cc0b29257939609298 (diff) | |
download | CMake-f3158e45b8fde882603e1d9b2262a5c64e25c1ee.zip CMake-f3158e45b8fde882603e1d9b2262a5c64e25c1ee.tar.gz CMake-f3158e45b8fde882603e1d9b2262a5c64e25c1ee.tar.bz2 |
QtAutogen: Move GetCompileDefinitionsAndDirectories method.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 216c5b4..76006fa 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -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) { |