diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-02-19 14:49:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-25 13:20:19 (GMT) |
commit | 747463d1b36a8bea31764db88ed4d9677b76f27f (patch) | |
tree | 1932fe24175f8ee70640561da78cda4b5579b807 /Source/cmQtAutoGeneratorMocUic.cxx | |
parent | 16c687825daef4008d52b9b68bfa603ba493ac03 (diff) | |
download | CMake-747463d1b36a8bea31764db88ed4d9677b76f27f.zip CMake-747463d1b36a8bea31764db88ed4d9677b76f27f.tar.gz CMake-747463d1b36a8bea31764db88ed4d9677b76f27f.tar.bz2 |
Autogen: Move additional source header search to configuration stage
The computation of additional source headers and and private headers for
AUTOGEN is moved from the _autogen target to the configuration stage. This
makes them available for _autogen target dependency computations.
Closes: #18949
Diffstat (limited to 'Source/cmQtAutoGeneratorMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorMocUic.cxx | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx index 0673f1d..b02cd44 100644 --- a/Source/cmQtAutoGeneratorMocUic.cxx +++ b/Source/cmQtAutoGeneratorMocUic.cxx @@ -9,7 +9,6 @@ #include <memory> #include <set> #include <sstream> -#include <unordered_set> #include <utility> #include "cmAlgorithms.h" @@ -1374,35 +1373,11 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile) // - Headers and sources { - std::unordered_set<std::string> headers; - auto addHeader = [this, &headers](std::string&& hdr, bool moc, bool uic) { - if (headers.emplace(hdr).second) { - this->JobQueues_.Headers.emplace_back( - cm::make_unique<JobParseT>(std::move(hdr), moc, uic, true)); - } + auto addHeader = [this](std::string&& hdr, bool moc, bool uic) { + this->JobQueues_.Headers.emplace_back( + cm::make_unique<JobParseT>(std::move(hdr), moc, uic, true)); }; - auto addSource = [this, &addHeader](std::string&& src, bool moc, - bool uic) { - // Search for the default header file and a private header - { - std::array<std::string, 2> bases; - bases[0] = FileSys().SubDirPrefix(src); - bases[0] += FileSys().GetFilenameWithoutLastExtension(src); - bases[1] = bases[0]; - bases[1] += "_p"; - for (std::string const& headerBase : bases) { - std::string header; - if (Base().FindHeader(header, headerBase)) { - bool const hdrMoc = moc && !Moc().skipped(header); - bool const hdrUic = uic && !Uic().skipped(header); - if (hdrMoc || hdrUic) { - // Add additional header job - addHeader(std::move(header), hdrMoc, hdrUic); - } - } - } - } - // Add actual source job + auto addSource = [this](std::string&& src, bool moc, bool uic) { this->JobQueues_.Sources.emplace_back( cm::make_unique<JobParseT>(std::move(src), moc, uic, false)); }; |