Autogen: Don't use AUTOMOC_MOC_OPTIONS in moc-predefs command

Closes #17418
This commit is contained in:
Sebastian Holtermann
2017-10-31 14:09:03 +01:00
parent f49b6871e9
commit 96d20a4de3

View File

@@ -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,