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:18 +0000 |
commit | b9698d13843680cac871634612413108452788c7 (patch) | |
tree | 2e9814d83f2430196712f3bd348dead7e9df4f3e /cmake | |
parent | 257d817491566b391541639f58f537c7e6e70fab (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>
Diffstat (limited to 'cmake')
-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 b3640e00c..9f5344ad3 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -936,8 +936,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}) |