summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-01 12:05:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-01 12:05:47 (GMT)
commit77e758a3edab6836151d5b1e690096c4f33dbd23 (patch)
treefd5e01e6b0f68510a449d33ccc30340f3e08cd09 /Source
parentcdc9c110a5bbe82d761f1a6d58b202a41b245de6 (diff)
parent4e46f97c84431e860aab3da78495b6c0e8c37725 (diff)
downloadCMake-77e758a3edab6836151d5b1e690096c4f33dbd23.zip
CMake-77e758a3edab6836151d5b1e690096c4f33dbd23.tar.gz
CMake-77e758a3edab6836151d5b1e690096c4f33dbd23.tar.bz2
Merge topic 'autogen-moc-predefs-no-moc-options'
4e46f97c Merge branch 'backport-3.9' into autogen-moc-predefs-no-moc-options 978c98b7 Autogen: Don't add AUTOMOC_MOC_OPTIONS to moc-predefs command d3caf941 Autogen: Tests: Set AUTOMOC_MOC_OPTIONS in a simple test 96d20a4d Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: EoD <eod@xmw.de> Merge-request: !1432
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 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,