summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-01-10 10:51:53 +0100
committerMichal Klocek <michal.klocek@qt.io>2022-01-12 23:00:21 +0000
commit511d360d4f196d739975fbdfb80b99bfa4f4cc80 (patch)
tree7eefac4c763cbb18e8c201d78446dd4236cf097e /cmake
parent3cfc627a19005d818a24398e410162484ef3b5b5 (diff)
downloadqtwebengine-511d360d4f196d739975fbdfb80b99bfa4f4cc80.tar.gz
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 Pick-to: 6.3 6.2 6.2.3 Change-Id: Ief727033e7b3ac32ab9f42bd96babd9be97f63a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Functions.cmake8
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})