diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-15 09:47:54 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-19 11:35:43 (GMT) |
commit | f37f1a647d5aba4de5903a3a3dc7700be55c99ec (patch) | |
tree | d99246e2b31afb9d46fccdb03c0ce5f416208874 /Source/cmQtAutoGenerators.cxx | |
parent | 5bb997c24a7ba8b6f252cc7914858f5c12a543b6 (diff) | |
download | CMake-f37f1a647d5aba4de5903a3a3dc7700be55c99ec.zip CMake-f37f1a647d5aba4de5903a3a3dc7700be55c99ec.tar.gz CMake-f37f1a647d5aba4de5903a3a3dc7700be55c99ec.tar.bz2 |
Autogen: Split moc options info string immediately
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ab9ca2c..56c09f8 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -154,13 +154,19 @@ static bool ListContains(const std::vector<std::string>& list, return (std::find(list.begin(), list.end(), entry) != list.end()); } -static std::string JoinOptions(const std::map<std::string, std::string>& opts) +static std::string JoinOptionsList(const std::vector<std::string>& opts) +{ + return cmOutputConverter::EscapeForCMake(cmJoin(opts, ";")); +} + +static std::string JoinOptionsMap( + const std::map<std::string, std::string>& opts) { std::string result; for (std::map<std::string, std::string>::const_iterator it = opts.begin(); it != opts.end(); ++it) { if (it != opts.begin()) { - result += "%%%"; + result += "@list_sep@"; } result += it->first; result += "==="; @@ -340,7 +346,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->MocDefinitions); this->MocInfoIncludes = GetConfigDefinition(makefile, "AM_MOC_INCLUDES", config); - this->MocInfoOptions = makefile->GetSafeDefinition("AM_MOC_OPTIONS"); + cmSystemTools::ExpandListArgument( + makefile->GetSafeDefinition("AM_MOC_OPTIONS"), this->MocOptions); // - Uic cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SKIP_UIC"), @@ -434,26 +441,25 @@ void cmQtAutoGenerators::SettingsFileRead(cmMakefile* makefile, // Compose current settings strings if (this->MocEnabled()) { std::string& str = this->SettingsStringMoc; - str += - cmOutputConverter::EscapeForCMake(cmJoin(this->MocDefinitions, ";")); + str += JoinOptionsList(this->MocDefinitions); str += " ~~~ "; str += this->MocInfoIncludes; str += " ~~~ "; - str += this->MocInfoOptions; + str += JoinOptionsList(this->MocOptions); str += " ~~~ "; str += this->IncludeProjectDirsBefore ? "TRUE" : "FALSE"; str += " ~~~ "; } if (this->UicEnabled()) { std::string& str = this->SettingsStringUic; - str += cmJoin(this->UicTargetOptions, "@osep@"); + str += JoinOptionsList(this->UicTargetOptions); str += " ~~~ "; - str += JoinOptions(this->UicOptions); + str += JoinOptionsMap(this->UicOptions); str += " ~~~ "; } if (this->RccEnabled()) { std::string& str = this->SettingsStringRcc; - str += JoinOptions(this->RccOptions); + str += JoinOptionsMap(this->RccOptions); str += " ~~~ "; } @@ -533,8 +539,6 @@ void cmQtAutoGenerators::Init() this->ProjectSourceDir, this->ProjectBinaryDir); - cmSystemTools::ExpandListArgument(this->MocInfoOptions, this->MocOptions); - std::vector<std::string> incPaths; cmSystemTools::ExpandListArgument(this->MocInfoIncludes, incPaths); |