Avoid the 'file' command shadowing
Avoid the 'file' command shadowing by a variable and use file name when filtering header files by type. Amends 8539e641f6f48a605547f66c47266d19e537f74e Task-number: QTBUG-103196 Change-Id: If012975efafaf119cffbd89baf84df334bc057ac Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
ae22bff97e
commit
0a4761522b
@ -1198,20 +1198,20 @@ function(qt_internal_collect_module_headers out_var target)
|
||||
get_target_property(private_filter ${target} _qt_module_private_headers_filter_regex)
|
||||
get_target_property(qpa_filter ${target} _qt_module_qpa_headers_filter_regex)
|
||||
|
||||
foreach(file IN LISTS sources)
|
||||
if(NOT IS_ABSOLUTE)
|
||||
get_filename_component(file "${file}" ABSOLUTE)
|
||||
endif()
|
||||
get_filename_component(file_name "${file}" NAME)
|
||||
foreach(file_path IN LISTS sources)
|
||||
get_filename_component(file_name "${file_path}" NAME)
|
||||
if(NOT file_name MATCHES ".+\\.h$")
|
||||
continue()
|
||||
endif()
|
||||
if(qpa_filter AND file MATCHES "${qpa_filter}")
|
||||
list(APPEND ${out_var}_qpa "${file}")
|
||||
elseif(private_filter AND file MATCHES "${private_filter}")
|
||||
list(APPEND ${out_var}_private "${file}")
|
||||
elseif(NOT public_filter OR file MATCHES "${public_filter}")
|
||||
list(APPEND ${out_var}_public "${file}")
|
||||
get_filename_component(file_path "${file_path}" ABSOLUTE)
|
||||
get_filename_component(file_path "${file_path}" REALPATH)
|
||||
list(APPEND ${out_var}_all "${file_path}")
|
||||
if(qpa_filter AND file_name MATCHES "${qpa_filter}")
|
||||
list(APPEND ${out_var}_qpa "${file_path}")
|
||||
elseif(private_filter AND file_name MATCHES "${private_filter}")
|
||||
list(APPEND ${out_var}_private "${file_path}")
|
||||
elseif(NOT public_filter OR file_name MATCHES "${public_filter}")
|
||||
list(APPEND ${out_var}_public "${file_path}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user