summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-10-31 14:09:03 +0100
committerSebastian Holtermann <sebholt@xwmw.org>2017-10-31 14:20:24 +0100
commit96d20a4de3420fca0e25a67c24e6f7eaead4420d (patch)
treefeb8612d625cac31b88c4e7b4d064d06aeb385e6 /Source
parentf49b6871e9f6de4948e8aa34446a1c933ca97935 (diff)
downloadcmake-96d20a4de3420fca0e25a67c24e6f7eaead4420d.tar.gz
Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command
Closes #17418
Diffstat (limited to 'Source')
-rw-r--r--Source/cmQtAutoGenerators.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 87c0f89ec7..b329d38283 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1392,9 +1392,13 @@ bool cmQtAutoGenerators::MocGenerateAll()
{
// Compose command
std::vector<std::string> cmd = this->MocPredefsCmd;
- // Add options
- cmd.insert(cmd.end(), this->MocAllOptions.begin(),
- this->MocAllOptions.end());
+ // Add includes
+ cmd.insert(cmd.end(), this->MocIncludes.begin(),
+ this->MocIncludes.end());
+ // Add definitions
+ for (std::string const& def : this->MocDefinitions) {
+ cmd.push_back("-D" + def);
+ }
// Execute command
if (!this->RunCommand(cmd, output)) {
this->LogCommandError(cmQtAutoGen::MOC,