From 96d20a4de3420fca0e25a67c24e6f7eaead4420d Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Tue, 31 Oct 2017 14:09:03 +0100 Subject: Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command Closes #17418 --- Source/cmQtAutoGenerators.cxx | 10 +++++++--- 1 file 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 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, -- cgit v0.12