summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGeneratorRcc.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-01-31 12:54:37 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-02-02 08:10:40 (GMT)
commita8ee7406a74cbc4d5e341ad33210b8eeb99af48f (patch)
tree3d13bde5ee4e44cc66eca61faff9007e108f53ad /Source/cmQtAutoGeneratorRcc.h
parent5a16e762e21e22e7a212acc7e2bc7bd027d66166 (diff)
downloadCMake-a8ee7406a74cbc4d5e341ad33210b8eeb99af48f.zip
CMake-a8ee7406a74cbc4d5e341ad33210b8eeb99af48f.tar.gz
CMake-a8ee7406a74cbc4d5e341ad33210b8eeb99af48f.tar.bz2
Autogen: Improved multi-config include scheme
For multi configuration generators AUTOMOC generates the moc files that are included in `mocs_compilation.cpp` in `AUTOGEN_BUILD_DIR/include_$<CONFIG>/`. By doing so each configuration reads different moc files when compiling `mocs_compilation.cpp`. Since we do not (need to) rewrite `mocs_compilation.cpp` on a configuration change anymore, the files also does not need to be recompiled anymore. Not having to rewrite and recompile `mocs_compilation.cpp` on a configuration change anymore was the main objective of this patch. In a similar fashion AUTORCC generates a `qrc_BASE_CMAKE.cpp` file below `AUTOGEN_BUILD_DIR/include_$<CONFIG>/` and `qrc_BASE.cpp` becomes a mere wrapper that includes this actuall rcc output file (when using multi configuration generators). The template files `Modules/AutoRccInfo.cmake.in` and `Modules/AutogenInfo.cmake.in` were removed in favor of writing the info `.cmake` files manually. Closes #17230
Diffstat (limited to 'Source/cmQtAutoGeneratorRcc.h')
-rw-r--r--Source/cmQtAutoGeneratorRcc.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmQtAutoGeneratorRcc.h b/Source/cmQtAutoGeneratorRcc.h
index 8a69c6c..55e0998 100644
--- a/Source/cmQtAutoGeneratorRcc.h
+++ b/Source/cmQtAutoGeneratorRcc.h
@@ -5,7 +5,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include "cmQtAutoGen.h"
#include "cmQtAutoGenerator.h"
#include "cm_uv.h"
@@ -26,7 +25,7 @@ private:
// -- Types
/// @brief Processing stage
- enum class StageT
+ enum class StageT : unsigned char
{
SETTINGS_READ,
TEST_QRC_RCC_FILES,
@@ -62,17 +61,18 @@ private:
void GenerateWrapper();
// -- Utility
+ bool IsMultiConfig() const { return MultiConfig_; }
+ std::string MultiConfigOutput() const;
bool StartProcess(std::string const& workingDirectory,
std::vector<std::string> const& command,
bool mergedOutput);
private:
// -- Config settings
- bool SettingsChanged_;
- std::string ConfigSuffix_;
- MultiConfigT MultiConfig_;
+ bool MultiConfig_;
// -- Directories
std::string AutogenBuildDir_;
+ std::string IncludeDir_;
// -- Qt environment
std::string RccExecutable_;
std::vector<std::string> RccListOptions_;
@@ -80,9 +80,10 @@ private:
std::string QrcFile_;
std::string QrcFileName_;
std::string QrcFileDir_;
- std::string RccFile_;
- std::string RccFileWrapper_;
- std::string RccFileBuild_;
+ std::string RccPathChecksum_;
+ std::string RccFileName_;
+ std::string RccFileOutput_;
+ std::string RccFilePublic_;
std::vector<std::string> Options_;
std::vector<std::string> Inputs_;
// -- Subprocess
@@ -91,6 +92,7 @@ private:
// -- Settings file
std::string SettingsFile_;
std::string SettingsString_;
+ bool SettingsChanged_;
// -- libuv loop
StageT Stage_;
bool Error_;