CMake: Fix usage of qt_process_qlalr when cross compiling
qtremoteobjects has a tool that uses qt_process_qlalr. The function doesn't have a check to see if the consuming target is an imported target, to skip doing any work when corss compiling. Fix it, like we do in qt_extend_target. Change-Id: Ide389a371aa07225f08689d15125c04d8b0e3916 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
9b72900834
commit
17d8b54cbc
@ -5090,6 +5090,12 @@ endfunction()
|
|||||||
# 'input_file_list' is a list of 'foo.g' file paths.
|
# 'input_file_list' is a list of 'foo.g' file paths.
|
||||||
# 'flags' are extra flags to be passed to qlalr.
|
# 'flags' are extra flags to be passed to qlalr.
|
||||||
function(qt_process_qlalr consuming_target input_file_list flags)
|
function(qt_process_qlalr consuming_target input_file_list flags)
|
||||||
|
# Don't try to extend_target when cross compiling an imported host target (like a tool).
|
||||||
|
qt_is_imported_target("${consuming_target}" is_imported)
|
||||||
|
if(is_imported)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach(input_file ${input_file_list})
|
foreach(input_file ${input_file_list})
|
||||||
file(STRINGS ${input_file} input_file_lines)
|
file(STRINGS ${input_file} input_file_lines)
|
||||||
qt_qlalr_find_option_in_list("${input_file_lines}" "^%parser(.+)" "parser")
|
qt_qlalr_find_option_in_list("${input_file_lines}" "^%parser(.+)" "parser")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user