mirror of
https://github.com/reactos/CMake.git
synced 2025-03-03 09:27:12 +00:00
Merge branch 'autogen-moc-predefs-no-moc-options' into release-3.10
Merge-request: !1432
This commit is contained in:
commit
1df31aa92a
@ -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,
|
||||
|
@ -65,6 +65,11 @@ add_executable(mocOnly mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySo
|
||||
set_property(TARGET mocOnly PROPERTY AUTOMOC ON)
|
||||
target_link_libraries(mocOnly ${QT_LIBRARIES})
|
||||
|
||||
add_executable(mocOnlyOpts mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp)
|
||||
set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC ON)
|
||||
set_property(TARGET mocOnlyOpts PROPERTY AUTOMOC_MOC_OPTIONS "-nw")
|
||||
target_link_libraries(mocOnlyOpts ${QT_LIBRARIES})
|
||||
|
||||
# -- Test
|
||||
# UIC only
|
||||
if(ALLOW_WRAP_CPP)
|
||||
|
Loading…
x
Reference in New Issue
Block a user