aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-04-26 18:02:09 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-04-29 16:22:15 +0200
commitd6fc3c0f4f98ef495ffc1d314103c0314fae1d98 (patch)
treef47b16c9cdaff9d3161386bac881e003b54acb40 /CMakeLists.txt
parent64512eafbae4e6888708b4b20e306d1f39281ce3 (diff)
CMake: Normalize submodule names by stripping tqtc- prefixes
In tqtc repos, the dependencies.yaml files may point to tqtc- prefixed repos, which can lead to build failures when doing a top-level build and the local repo directory names have no tqtc- prefix. This is the case both in the CI, and when using init-repository or git submodule init --recursive, because qt5.git specifies the 'path' key for each submodule to not contain any tqtc- prefix. Normalize the repo names by removing the tqtc- prefix when doing dependency resolution for CMake add_subdirectory calls, if such a submodule name does not exist on-disk. The normalization is conditional, to allow inclusion of repos that don't have a non-tqtc mirror. qt_internal_sync_to and the other git related operations are currently broken (both before and after this change) when used in conjunction with tqtc- repos and is non-trivial to fix. The first problem is the assumption of using the 'origin' remote, which will likely be an open-source repo that doesn't contain any tqtc repos. The second problem is that we would need to agree upon requiring 2 remotes, one open source and one tqtc one, to reliably choose where to clone / fetch from, as well as determining whether the checked out repo name needs to have a tqtc- prefix (by checking whether the repo does not exist in the open source remote for commercial only repos). Alternatively we could hard code a list of known open source repos, and anything not in the list will have its tqtc- prefix kept, but we still need to know which remote to use. As a drive-by, adjusted some of the shown messages for better readability and easier grepping. Fixes: QTBUG-102883 Change-Id: I6806b119dd32b14dc0d9711dc829bfc5130d1e6f Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 30068f2223b112650a1fb61ca6fd3b42cb26fcd3)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1afb2f5..88e440a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,7 @@ qt_internal_sort_module_dependencies("${QT_BUILD_SUBMODULES}" QT_BUILD_SUBMODULE
foreach(module IN LISTS QT_BUILD_SUBMODULES)
# Check for unmet dependencies
if(NOT DEFINED BUILD_${module} OR BUILD_${module})
- message(NOTICE "Checking dependencies of '${module}'")
+ message(NOTICE "Checking dependencies of submodule '${module}'")
get_property(required_deps GLOBAL PROPERTY QT_REQUIRED_DEPS_FOR_${module})
get_property(dependencies GLOBAL PROPERTY QT_DEPS_FOR_${module})
foreach(dep IN LISTS dependencies)
@@ -93,7 +93,7 @@ foreach(module IN LISTS QT_BUILD_SUBMODULES)
endforeach()
foreach(module IN LISTS QT_BUILD_SUBMODULES)
- message(NOTICE "Configuring '${module}'")
+ message(NOTICE "Configuring submodule '${module}'")
ecm_optional_add_subdirectory("${module}")
if(module STREQUAL "qtbase")