diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-19 22:17:30 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-19 22:23:28 (GMT) |
commit | 460e8fb9ad4eb58e06cefa0fce0df6f14644af4e (patch) | |
tree | cc79024218b6e9bc51bbb9d129e8f41cfa829a10 /Source/cmQtAutoGenerators.cxx | |
parent | 58f41c789ffd102cdf3c9c8e49a2fe3b5da21a0b (diff) | |
download | CMake-460e8fb9ad4eb58e06cefa0fce0df6f14644af4e.zip CMake-460e8fb9ad4eb58e06cefa0fce0df6f14644af4e.tar.gz CMake-460e8fb9ad4eb58e06cefa0fce0df6f14644af4e.tar.bz2 |
QtAutogen: Inline static factory method.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 79e7f70..853a706 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1203,28 +1203,21 @@ std::string cmQtAutoGenerators::GetRccExecutable(cmTarget const* target) return std::string(); } -static cmGlobalGenerator* CreateGlobalGenerator(cmake* cm, - const std::string& targetDirectory) +bool cmQtAutoGenerators::Run(const std::string& targetDirectory, + const std::string& config) { + bool success = true; + cmake cm; + cm.SetHomeOutputDirectory(targetDirectory); + cm.SetHomeDirectory(targetDirectory); cmGlobalGenerator* gg = new cmGlobalGenerator(); - gg->SetCMakeInstance(cm); + gg->SetCMakeInstance(&cm); cmLocalGenerator* lg = gg->MakeLocalGenerator(); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); gg->SetCurrentLocalGenerator(lg); - return gg; -} - -bool cmQtAutoGenerators::Run(const std::string& targetDirectory, - const std::string& config) -{ - bool success = true; - cmake cm; - cm.SetHomeOutputDirectory(targetDirectory); - cm.SetHomeDirectory(targetDirectory); - cmGlobalGenerator* gg = CreateGlobalGenerator(&cm, targetDirectory); cmMakefile* makefile = gg->GetCurrentLocalGenerator()->GetMakefile(); this->ReadAutogenInfoFile(makefile, targetDirectory, config); |