From c3aa0529426c1f325d8e143c75c0f98547504ae0 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 7 Feb 2024 14:26:45 +0100 Subject: [PATCH] Add configure mappings for QT_BUILD__PROJECT Change-Id: I1e9f877c4c9b6257f4f90e3361d5a0226e62e841 Reviewed-by: Alexandru Croitor (cherry picked from commit 7c9efdf40c9d9f7f89f7a9be0c06e0d3ec54ec2c) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtProcessConfigureArgs.cmake | 14 ++++++++++++++ cmake/configure-cmake-mapping.md | 2 ++ config_help.txt | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index ccae19e5921..3f986ede283 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -110,6 +110,20 @@ while(NOT "${configure_args}" STREQUAL "") foreach(qtrepo IN LISTS qtrepos) push("-DBUILD_${qtrepo}=OFF") endforeach() + elseif(arg STREQUAL "-skip-tests") + list(POP_FRONT configure_args qtrepos) + is_non_empty_valid_arg("${arg}" "${qtrepos}") + list(TRANSFORM qtrepos REPLACE "," ";") + foreach(qtrepo IN LISTS qtrepos) + push("-DQT_BUILD_TESTS_PROJECT_${qtrepo}=OFF") + endforeach() + elseif(arg STREQUAL "-skip-examples") + list(POP_FRONT configure_args qtrepos) + is_non_empty_valid_arg("${arg}" "${qtrepos}") + list(TRANSFORM qtrepos REPLACE "," ";") + foreach(qtrepo IN LISTS qtrepos) + push("-DQT_BUILD_EXAMPLES_PROJECT_${qtrepo}=OFF") + endforeach() elseif(arg STREQUAL "-submodules") warn_in_per_repo_build("${arg}") list(POP_FRONT configure_args submodules) diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md index c32e3179ed9..8bec2401116 100644 --- a/cmake/configure-cmake-mapping.md +++ b/cmake/configure-cmake-mapping.md @@ -93,6 +93,8 @@ The following table describes the mapping of configure options to CMake argument | -android-javac-source | -DQT_ANDROID_JAVAC_SOURCE=7 | Set the javac build source version. | | -android-javac-target | -DQT_ANDROID_JAVAC_TARGET=7 | Set the javac build target version. | | -skip ,..., | -DBUILD_=OFF | | +| -skip-tests ,..., | -DQT_BUILD_TESTS_PROJECT_=OFF | | +| -skip-examples ,..., | -DQT_BUILD_EXAMPLES_PROJECT_=OFF | | | -submodules ,..., | -DQT_BUILD_SUBMODULES=;...; | | | -make | -DQT_BUILD_TESTS=ON | A way to turn on tools explicitly is missing. If tests/examples | | | -DQT_BUILD_EXAMPLES=ON | are enabled, you can disable their building as part of the | diff --git a/config_help.txt b/config_help.txt index 180496467c5..f77639f7de5 100644 --- a/config_help.txt +++ b/config_help.txt @@ -196,6 +196,12 @@ Component selection: -skip [,] Exclude one or more entire repositories from the build. The list should be separated with commas. e.g. -skip qtimageformats,qtsvg + -skip-tests [,] ... Skip building tests for one or more + repositories. The list should be separated with commas. + e.g. -skip-tests qtimageformats,qtsvg + -skip-examples [,] ... Skip building examples for one or more + repositories. The list should be separated with commas. + e.g. -skip-examples qtimageformats,qtsvg -make ......... Add to the list of parts to be built. Specifying this option clears the default list first. (allowed values: libs, tools, examples, tests,