From b71b7461b0b95bbf02c215019381b19e4070e07c Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Fri, 29 Sep 2017 22:17:10 +0200 Subject: CMake: Set SKIP_AUTOMOC/AUTOUIC where needed Make sure we don't run into warnings for CMake 3.10 Task-number: QTBUG-63442 Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7 Reviewed-by: David Faure Reviewed-by: Sebastian Holtermann Reviewed-by: Rolf Eike Beer --- src/corelib/Qt5CoreMacros.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/corelib/Qt5CoreMacros.cmake') diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake index 489bc75511..8b65db95cb 100644 --- a/src/corelib/Qt5CoreMacros.cmake +++ b/src/corelib/Qt5CoreMacros.cmake @@ -137,6 +137,9 @@ function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target DEPENDS ${infile} ${moc_depends} ${_moc_working_dir} VERBATIM) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) endfunction() @@ -155,7 +158,6 @@ function(QT5_GENERATE_MOC infile outfile ) set(moc_target ${ARGV3}) endif() qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "") - set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file endfunction() @@ -246,6 +248,7 @@ function(QT5_ADD_BINARY_RESOURCES target ) get_filename_component(infile ${it} ABSOLUTE) _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) set(infiles ${infiles} ${infile}) set(out_depends ${out_depends} ${_out_depends}) set(rc_depends ${rc_depends} ${_rc_depends}) @@ -255,7 +258,6 @@ function(QT5_ADD_BINARY_RESOURCES target ) COMMAND ${Qt5Core_RCC_EXECUTABLE} ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles} DEPENDS ${rc_depends} ${out_depends} VERBATIM) - add_custom_target(${target} ALL DEPENDS ${rcc_destination}) endfunction() @@ -283,12 +285,15 @@ function(QT5_ADD_RESOURCES outfiles ) set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp) _QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends) + set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON) add_custom_command(OUTPUT ${outfile} COMMAND ${Qt5Core_RCC_EXECUTABLE} ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile} MAIN_DEPENDENCY ${infile} DEPENDS ${_rc_depends} "${out_depends}" VERBATIM) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON) + set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON) list(APPEND ${outfiles} ${outfile}) endforeach() set(${outfiles} ${${outfiles}} PARENT_SCOPE) -- cgit v1.2.3