summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-29 22:17:10 +0200
committerDavid Faure <david.faure@kdab.com>2017-11-22 13:51:30 +0000
commitb71b7461b0b95bbf02c215019381b19e4070e07c (patch)
treeb41652ad0d3e5deda83b857c866d70d02f643d0a /src/corelib
parentc3a5c482efcac794033721e4e32b01b012704096 (diff)
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 <david.faure@kdab.com> Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake9
1 files changed, 7 insertions, 2 deletions
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)