diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-26 16:27:44 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-09-26 16:48:23 (GMT) |
commit | f9a77e76e4e1c19c094ff770487e677a92a1198b (patch) | |
tree | 0e4b4faccb6f864b1d71408a99b82f6ffe8548bc /Source | |
parent | c3633e7a416373e6c8e8f87b4920a8a41c5afd82 (diff) | |
download | CMake-f9a77e76e4e1c19c094ff770487e677a92a1198b.zip CMake-f9a77e76e4e1c19c094ff770487e677a92a1198b.tar.gz CMake-f9a77e76e4e1c19c094ff770487e677a92a1198b.tar.bz2 |
QtAutogen: Don't use a member to store skipped uic files.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 20 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.h | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index becfeba..f48c0bc 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -561,6 +561,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) makefile->AddDefinition("_target_qt_version", qtVersion); } + std::vector<std::string> skipUic; std::map<std::string, std::string> configIncludes; std::map<std::string, std::string> configDefines; std::map<std::string, std::string> configUicOptions; @@ -569,7 +570,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) || target->GetPropertyAsBool("AUTOUIC") || target->GetPropertyAsBool("AUTORCC")) { - this->SetupSourceFiles(target); + this->SetupSourceFiles(target, skipUic); } makefile->AddDefinition("_cpp_files", cmOutputConverter::EscapeForCMake(this->Sources).c_str()); @@ -580,7 +581,7 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) } if (target->GetPropertyAsBool("AUTOUIC")) { - this->SetupAutoUicTarget(target, configUicOptions); + this->SetupAutoUicTarget(target, skipUic, configUicOptions); } if (target->GetPropertyAsBool("AUTORCC")) { @@ -655,7 +656,8 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target) } } -void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) +void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target, + std::vector<std::string>& skipUic) { cmMakefile* makefile = target->GetMakefile(); @@ -669,7 +671,6 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) gtgt->GetConfigCommonSourceFiles(srcFiles); const char *skipMocSep = ""; - const char *skipUicSep = ""; std::vector<std::string> newRccFiles; @@ -685,9 +686,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) if(cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTOUIC"))) { - this->SkipUic += skipUicSep; - this->SkipUic += absFile; - skipUicSep = ";"; + skipUic.push_back(absFile); } std::string ext = sf->GetExtension(); @@ -894,17 +893,16 @@ static void GetUicOpts(cmTarget const* target, const std::string& config, } void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target, + std::vector<std::string> const& skipUic, std::map<std::string, std::string> &configUicOptions) { cmMakefile *makefile = target->GetMakefile(); std::set<std::string> skipped; - std::vector<std::string> skipVec; - cmSystemTools::ExpandListArgument(this->SkipUic, skipVec); - skipped.insert(skipVec.begin(), skipVec.end()); + skipped.insert(skipUic.begin(), skipUic.end()); makefile->AddDefinition("_skip_uic", - cmOutputConverter::EscapeForCMake(this->SkipUic).c_str()); + cmOutputConverter::EscapeForCMake(cmJoin(skipUic, ";")).c_str()); std::vector<cmSourceFile*> uiFilesWithOptions = makefile->GetQtUiFilesWithOptions(); diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 25e045f..c1dac2b 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -33,7 +33,8 @@ public: bool InitializeAutogenTarget(cmLocalGenerator* lg, cmTarget* target); void SetupAutoGenerateTarget(cmTarget const* target); - void SetupSourceFiles(cmTarget const* target); + void SetupSourceFiles(cmTarget const* target, + std::vector<std::string>& skipUic); private: void SetupAutoMocTarget(cmTarget const* target, @@ -41,6 +42,7 @@ private: std::map<std::string, std::string> &configIncludes, std::map<std::string, std::string> &configDefines); void SetupAutoUicTarget(cmTarget const* target, + const std::vector<std::string>& skipUic, std::map<std::string, std::string> &configUicOptions); void SetupAutoRccTarget(cmTarget const* target); |