summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-16 18:10:58 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-17 15:13:43 +0200
commit17d8b54cbc0a9ef507808d19733b2a753717a0dd (patch)
treefbcfe871b74b672d5fb7c9f510c603b4b8619c75 /cmake
parent9b72900834a59e07d495fa641526583c2a554840 (diff)
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>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 036a291725..c82b33ab8b 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -5090,6 +5090,12 @@ endfunction()
# 'input_file_list' is a list of 'foo.g' file paths.
# 'flags' are extra flags to be passed to qlalr.
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})
file(STRINGS ${input_file} input_file_lines)
qt_qlalr_find_option_in_list("${input_file_lines}" "^%parser(.+)" "parser")