diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index d26f9c06b49..00337b3b707 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -111,6 +111,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,