aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-06-02 16:21:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-07-06 05:17:38 +0000
commit235cb3b7b08a027ebb97db2eee71bb820c5492e8 (patch)
tree32e7333dc0dfff14c9b10f1eab267a30dfe85ea0 /CMakeLists.txt
parent33a76dfc574759e6dacfde77bb08b08b248a5a7a (diff)
Show an error when a submodule is missing, or misspelled
Stop the configuration and show an error if one of the submodules is missing, or misspelled in `-submodules` option. Fixes: QTBUG-114133 Change-Id: I890d4f5f0614288a2be422f839e04a0086a58403 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor (OOO) <alexandru.croitor@qt.io> (cherry picked from commit bb13b7dadf96707f441daed3f33fddcc7b84a844) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fff3d0e..44969693 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,15 @@ if(NOT QT_BUILD_SUBMODULES)
endif()
set(QT_BUILD_SUBMODULES "${QT_BUILD_SUBMODULES}" CACHE STRING "Submodules to build")
+foreach(module IN LISTS QT_BUILD_SUBMODULES)
+ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${module}/CMakeLists.txt)
+ message(FATAL_ERROR
+ "Module '${module}' cannot be found. Please double-check the "
+ "spelling and try again. Or run `./init-repository` to get "
+ "the submodules.")
+ endif()
+endforeach()
+
qt_internal_sort_module_dependencies("${QT_BUILD_SUBMODULES}" QT_BUILD_SUBMODULES)
foreach(module IN LISTS QT_BUILD_SUBMODULES)