diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2018-05-11 16:54:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-15 13:50:22 (GMT) |
commit | 9672d81ca3e51004f94bb2d9503e8b569565c8d0 (patch) | |
tree | 0576e3f0e1c6be4c9fed87ca9c26be1938772807 /Modules/Qt4Macros.cmake | |
parent | 800b2fcf80aeab9849036e56e84036b70deb077b (diff) | |
download | CMake-9672d81ca3e51004f94bb2d9503e8b569565c8d0.zip CMake-9672d81ca3e51004f94bb2d9503e8b569565c8d0.tar.gz CMake-9672d81ca3e51004f94bb2d9503e8b569565c8d0.tar.bz2 |
Qt4Macros: Don't AUTOMOC or AUTOUIC qt4-generated files
Suppress AUTOMOC and AUTOUIC on files generated by Qt4 wrapping macros;
particularly, those generated by `qt4_wrap_cpp`, `qt4_wrap_ui`, and
`qt4_add_resources`. None of these should need AUTOMOC or AUTOUIC
treatment, and CMP0071 makes it important to mark this explicitly.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r-- | Modules/Qt4Macros.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index 49c8a60..a2c8d85 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -152,6 +152,7 @@ macro (QT4_GENERATE_MOC infile outfile ) endif() QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}") set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file endmacro () @@ -166,6 +167,8 @@ macro (QT4_WRAP_CPP outfiles ) get_filename_component(it ${it} ABSOLUTE) QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}") + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file set(${outfiles} ${${outfiles}} ${outfile}) endforeach() @@ -185,6 +188,8 @@ macro (QT4_WRAP_UI outfiles ) COMMAND Qt4::uic ARGS ${ui_options} -o ${outfile} ${infile} MAIN_DEPENDENCY ${infile} VERBATIM) + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file set(${outfiles} ${${outfiles}} ${outfile}) endforeach () @@ -233,6 +238,8 @@ macro (QT4_ADD_RESOURCES outfiles ) ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} MAIN_DEPENDENCY ${infile} DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM) + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${outfile} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file set(${outfiles} ${${outfiles}} ${outfile}) endforeach () @@ -267,6 +274,7 @@ macro(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) DEPENDS ${_infile} VERBATIM) set_property(SOURCE ${_impl} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${_impl} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file QT4_GENERATE_MOC("${_header}" "${_moc}") @@ -351,6 +359,7 @@ macro(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional QT4_GENERATE_MOC("${_header}" "${_moc}") set_property(SOURCE ${_impl} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file + set_property(SOURCE ${_impl} PROPERTY SKIP_AUTOUIC TRUE) # don't run autouic on this file MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}") list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}") |