diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-01-10 10:51:53 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-14 14:20:53 +0000 |
commit | b46b894177208b00a850f760c03e34d88b56df05 (patch) | |
tree | 2307fb08ae66a4fb184032262dff075a160196ba | |
parent | ed2c41da842f7cbf5fef73d65c3b18e49cc9734e (diff) |
Fix multi config generator and add checks for configs,archs
Fix typo config -> configs.
Add checks for configs and archs, otherwise we silently do
not set right dependencies and continue the build.
This can end up in weird looking errors.
Task-number: QTBUG-99511
Change-Id: Ief727033e7b3ac32ab9f42bd96babd9be97f63a6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 511d360d4f196d739975fbdfb80b99bfa4f4cc80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | cmake/Functions.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index 3bdf86c83..95f279946 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -931,8 +931,14 @@ function(add_gn_build_aritfacts_to_target cmakeTarget ninjaTarget module buildDi # config loop is a workaround to be able to add_custom_command per config # note this is fixed in CMAKE.3.20 and should be cleaned up when 3.20 is # the minimum cmake we support - get_configs(config) + get_configs(configs) get_architectures(archs) + if(NOT configs) + message(FATAL_ERROR "No valid configurations found !") + endif() + if(NOT archs) + message(FATAL_ERROR "No valid architectures found. In case of cross-compiling make sure you have CMAKE_SYSTEM_PROCESSOR in your toolchain file.") + endif() foreach(config ${configs}) foreach(arch ${archs}) set(target ${ninjaTarget}_${config}_${arch}) |