summaryrefslogtreecommitdiff
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-11-16 09:59:03 +0100
committerSebastian Holtermann <sebholt@xwmw.org>2017-11-19 12:51:30 +0100
commitb2a0b549bb9fea678517a52caf333eae009901dd (patch)
treea19e2b6ed59897a505f5e2b8caaddeed3de4dcf8 /Source/cmcmd.cxx
parent85ae0ba796c26b9ba2f7025e267d3f438db388c6 (diff)
downloadcmake-b2a0b549bb9fea678517a52caf333eae009901dd.tar.gz
Autogen: Introduce standalone RCC generator class
Introduces the standalone RCC generator class `cmQtAutoGeneratorRcc`. Every instance of `cmQtAutoGeneratorRcc` class handles the `rcc` invocation for a single `.qrc` file. The class will be used in the future to allow parallel `.qrc` file processing by calling `cmake -E cmake_autorcc <INFO_FILE> <CONFIG>`.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 449db9d5ca..a37bc3c1b4 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -6,6 +6,7 @@
#include "cmGlobalGenerator.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
+#include "cmQtAutoGeneratorRcc.h"
#include "cmQtAutoGenerators.h"
#include "cmStateDirectory.h"
#include "cmStateSnapshot.h"
@@ -992,11 +993,20 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
}
#ifdef CMAKE_BUILD_WITH_CMAKE
- if (args[1] == "cmake_autogen" && args.size() >= 4) {
- cmQtAutoGenerators autogen;
+ if ((args[1] == "cmake_autogen") && (args.size() >= 4)) {
+ cmQtAutoGenerators autoGen;
+ std::string const& infoDir = args[2];
std::string const& config = args[3];
- bool autogenSuccess = autogen.Run(args[2], config);
- return autogenSuccess ? 0 : 1;
+ return autoGen.Run(infoDir, config) ? 0 : 1;
+ }
+ if ((args[1] == "cmake_autorcc") && (args.size() >= 3)) {
+ cmQtAutoGeneratorRcc autoGen;
+ std::string const& infoFile = args[2];
+ std::string config;
+ if (args.size() > 3) {
+ config = args[3];
+ };
+ return autoGen.Run(infoFile, config) ? 0 : 1;
}
#endif