diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-12 10:14:12 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-16 16:18:48 (GMT) |
commit | 1a3f185c1a1f5f67e6c7d8d821f17619208e6311 (patch) | |
tree | 513f47dbc41cf98a06a948bdfcb58982d9690994 /Source/cmQtAutoGen.cxx | |
parent | 726ea1d15134591c352468b64b3e92f04f2449bb (diff) | |
download | CMake-1a3f185c1a1f5f67e6c7d8d821f17619208e6311.zip CMake-1a3f185c1a1f5f67e6c7d8d821f17619208e6311.tar.gz CMake-1a3f185c1a1f5f67e6c7d8d821f17619208e6311.tar.bz2 |
Autogen: Split JobProbeDepsT job into separate moc and uic jobs
By splitting `JobProbeDepsT` into two independent `JobProbeDepsMocT`,
`JobProbeDepsUicT`, the moc and uic job generation will happen concurrently.
This should improve the execution speed, when both AUTOMOC and AUTOUIC are
enabled.
Parent directory names for moc and uic output files are are collected in
a `std::unordered_set<std::string>` and get created in a batch.
Beforehand we tried to create the parent directory for each output file.
This led to duplications of `MakeDirectory` calls when there were multiple
output files in the same directory (which is the case usually).
Diffstat (limited to 'Source/cmQtAutoGen.cxx')
-rw-r--r-- | Source/cmQtAutoGen.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index f3c78d3..57c8825 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -162,6 +162,15 @@ std::string cmQtAutoGen::QuotedCommand(std::vector<std::string> const& command) return res; } +std::string cmQtAutoGen::ParentDir(cm::string_view filename) +{ + auto slashPos = filename.rfind('/'); + if (slashPos == cm::string_view::npos) { + return std::string(); + } + return std::string(filename.substr(0, slashPos)); +} + std::string cmQtAutoGen::SubDirPrefix(cm::string_view filename) { auto slashPos = filename.rfind('/'); |