From d51cc88e844c78c01c1616e6a2fb102c0682dd00 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Tue, 27 Dec 2016 19:03:14 +0100 Subject: AUTOGEN: Generators: Split config headers/sources into vector --- Source/cmQtAutoGenerators.cxx | 23 ++++++++++------------- Source/cmQtAutoGenerators.h | 4 ++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index f2f1505..5a370fe 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -221,8 +221,10 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( this->RccExecutable = makefile->GetSafeDefinition("AM_QT_RCC_EXECUTABLE"); // - File Lists - this->Sources = makefile->GetSafeDefinition("AM_SOURCES"); - this->Headers = makefile->GetSafeDefinition("AM_HEADERS"); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_SOURCES"), + this->Sources); + cmSystemTools::ExpandListArgument(makefile->GetSafeDefinition("AM_HEADERS"), + this->Headers); // - Moc this->SkipMoc = makefile->GetSafeDefinition("AM_SKIP_MOC"); @@ -501,9 +503,6 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) // collect all headers which may need to be mocced std::set headerFiles; - std::vector sourceFiles; - cmSystemTools::ExpandListArgument(this->Sources, sourceFiles); - const std::vector& headerExtensions = makefile->GetCMakeInstance()->GetHeaderExtensions(); @@ -512,13 +511,13 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) std::vector uicSkipped; cmSystemTools::ExpandListArgument(this->SkipUic, uicSkipped); - for (std::vector::const_iterator it = sourceFiles.begin(); - it != sourceFiles.end(); ++it) { - const bool skipUic = - std::find(uicSkipped.begin(), uicSkipped.end(), *it) != uicSkipped.end(); + for (std::vector::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(); std::map >& uiFiles = skipUic ? skippedUis : includedUis; - const std::string& absFilename = *it; if (this->Verbose) { std::ostringstream err; err << "AUTOGEN: Checking " << absFilename << std::endl; @@ -551,9 +550,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) } } - std::vector headerFilesVec; - cmSystemTools::ExpandListArgument(this->Headers, headerFilesVec); - headerFiles.insert(headerFilesVec.begin(), headerFilesVec.end()); + headerFiles.insert(this->Headers.begin(), this->Headers.end()); // key = moc source filepath, value = moc output filename std::map notIncludedMocs; diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index c6fe3b6..bffdee2 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -116,8 +116,8 @@ private: std::string UicExecutable; std::string RccExecutable; // - File lists - std::string Sources; - std::string Headers; + std::vector Sources; + std::vector Headers; // - Moc std::string SkipMoc; std::string MocCompileDefinitionsStr; -- cgit v0.12