summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-10-31 13:09:03 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-10-31 13:20:24 (GMT)
commit96d20a4de3420fca0e25a67c24e6f7eaead4420d (patch)
treefeb8612d625cac31b88c4e7b4d064d06aeb385e6 /Source/cmQtAutoGenerators.cxx
parentf49b6871e9f6de4948e8aa34446a1c933ca97935 (diff)
downloadCMake-96d20a4de3420fca0e25a67c24e6f7eaead4420d.zip
CMake-96d20a4de3420fca0e25a67c24e6f7eaead4420d.tar.gz
CMake-96d20a4de3420fca0e25a67c24e6f7eaead4420d.tar.bz2
Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command
Closes #17418
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 87c0f89..b329d38 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,