summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOrkun Tokdemir <orkun.tokdemir@qt.io>2023-05-30 15:09:33 +0200
committerOrkun Tokdemir <orkun.tokdemir@qt.io>2023-06-01 19:10:09 +0200
commit443068dbba39696923cf852d8eccbbfb5f8571a7 (patch)
treeba66f595cb44e8f50e68baa104f173f1a0ad0b93 /src
parent2f273f5dfd95c711b2be1458582596f3ca61a436 (diff)
Add SKIP_LINTING for generated source files
Since the `SKIP_LINTING` source property was added to upstream cmake here https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8467, that source property should also be set for source files generated by qt's cmake public api Change-Id: Ic9d6c119abbc7c51b146176970c1d0bafb097abf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt6CoreMacros.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index 0eaab9d3da..33cc3d32f1 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -129,8 +129,12 @@ function(_qt_internal_create_moc_command infile outfile moc_flags moc_options
${_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)
+ set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON
+ SKIP_AUTOUIC ON
+ )
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.27")
+ set_source_files_properties(${outfile} PROPERTIES SKIP_LINTING ON)
+ endif()
endfunction()
function(qt6_generate_moc infile outfile )
@@ -442,6 +446,9 @@ function(qt6_add_big_resources outfiles )
_qt6_parse_qrc_file(${infile} _out_depends _rc_depends)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTOGEN ON)
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.27")
+ set_source_files_properties(${tmpoutfile} PROPERTIES SKIP_LINTING ON)
+ endif()
add_custom_command(OUTPUT ${tmpoutfile}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile}
DEPENDS ${infile} ${_rc_depends} "${out_depends}" ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
@@ -2047,6 +2054,9 @@ function(_qt_internal_process_resource target resourceName)
SKIP_UNITY_BUILD_INCLUSION TRUE
SKIP_PRECOMPILE_HEADERS TRUE
)
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.27")
+ set_source_files_properties(${generatedOutfile} ${scope_args} PROPERTIES SKIP_LINTING ON)
+ endif()
get_target_property(target_source_dir ${target} SOURCE_DIR)
if(NOT target_source_dir STREQUAL CMAKE_CURRENT_SOURCE_DIR)