diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-12-27 18:08:23 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-01-10 11:49:14 (GMT) |
commit | 9986da4f0f2f49c0d7d260f9d21deaa906708376 (patch) | |
tree | 17b17b2f314d0528174f923782cf28f4d110e565 /Source | |
parent | d51cc88e844c78c01c1616e6a2fb102c0682dd00 (diff) | |
download | CMake-9986da4f0f2f49c0d7d260f9d21deaa906708376.zip CMake-9986da4f0f2f49c0d7d260f9d21deaa906708376.tar.gz CMake-9986da4f0f2f49c0d7d260f9d21deaa906708376.tar.bz2 |
AUTOGEN: Generators: Split config SKIP_MOC and SKIP_UIC into vectors
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 36 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.h | 4 |
2 files changed, 18 insertions, 22 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 5a370fe..33550b0 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -227,7 +227,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->Headers); // - Moc - this->SkipMoc = makefile->GetSafeDefinition("AM_SKIP_MOC"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SKIP_MOC"), + this->SkipMoc); { std::string compileDefsPropOrig = "AM_MOC_COMPILE_DEFINITIONS"; std::string compileDefsProp = compileDefsPropOrig; @@ -254,7 +255,8 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->MocOptionsStr = makefile->GetSafeDefinition("AM_MOC_OPTIONS"); // - Uic - this->SkipUic = makefile->GetSafeDefinition("AM_SKIP_UIC"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SKIP_UIC"), + this->SkipUic); { const char* uicOptionsFiles = makefile->GetSafeDefinition("AM_UIC_OPTIONS_FILES"); @@ -508,14 +510,12 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::map<std::string, std::vector<std::string> > includedUis; std::map<std::string, std::vector<std::string> > skippedUis; - std::vector<std::string> uicSkipped; - cmSystemTools::ExpandListArgument(this->SkipUic, uicSkipped); for (std::vector<std::string>::const_iterator it = this->Sources.begin(); it != this->Sources.end(); ++it) { const std::string& absFilename = *it; - const bool skipUic = std::find(uicSkipped.begin(), uicSkipped.end(), - absFilename) != uicSkipped.end(); + const bool skipUic = std::find(this->SkipUic.begin(), this->SkipUic.end(), + absFilename) != this->SkipUic.end(); std::map<std::string, std::vector<std::string> >& uiFiles = skipUic ? skippedUis : includedUis; if (this->Verbose) { @@ -532,21 +532,17 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) this->SearchHeadersForCppFile(absFilename, headerExtensions, headerFiles); } - { - std::vector<std::string> mocSkipped; - cmSystemTools::ExpandListArgument(this->SkipMoc, mocSkipped); - for (std::vector<std::string>::const_iterator it = mocSkipped.begin(); - it != mocSkipped.end(); ++it) { - if (std::find(uicSkipped.begin(), uicSkipped.end(), *it) != - uicSkipped.end()) { - const std::string& absFilename = *it; - if (this->Verbose) { - std::ostringstream err; - err << "AUTOGEN: Checking " << absFilename << std::endl; - this->LogInfo(err.str()); - } - this->ParseForUic(absFilename, includedUis); + for (std::vector<std::string>::const_iterator it = this->SkipMoc.begin(); + it != this->SkipMoc.end(); ++it) { + if (std::find(this->SkipUic.begin(), this->SkipUic.end(), *it) != + this->SkipUic.end()) { + const std::string& absFilename = *it; + if (this->Verbose) { + std::ostringstream err; + err << "AUTOGEN: Checking " << absFilename << std::endl; + this->LogInfo(err.str()); } + this->ParseForUic(absFilename, includedUis); } } diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index bffdee2..f86e7c3 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -119,7 +119,7 @@ private: std::vector<std::string> Sources; std::vector<std::string> Headers; // - Moc - std::string SkipMoc; + std::vector<std::string> SkipMoc; std::string MocCompileDefinitionsStr; std::string MocIncludesStr; std::string MocOptionsStr; @@ -129,7 +129,7 @@ private: std::list<std::string> MocDefinitions; std::vector<std::string> MocOptions; // - Uic - std::string SkipUic; + std::vector<std::string> SkipUic; std::vector<std::string> UicTargetOptions; std::map<std::string, std::string> UicOptions; // - Rcc |