diff options
-rw-r--r-- | cmake/QtProcessConfigureArgs.cmake | 17 | ||||
-rw-r--r-- | cmake/configure-cmake-mapping.md | 2 | ||||
-rw-r--r-- | config_help.txt | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 2440f63627..2a92ba6f83 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -25,6 +25,15 @@ macro(pop_path_argument) file(TO_CMAKE_PATH "${path}" path) endmacro() +function(is_non_empty_valid_arg arg value) + if(value STREQUAL "") + message(FATAL_ERROR "Value supplied to command line option '${arg}' is empty.") + elseif(value MATCHES "^-.*") + message(FATAL_ERROR + "Value supplied to command line option '${arg}' is invalid: ${value}") + endif() +endfunction() + if("${MODULE_ROOT}" STREQUAL "") # If MODULE_ROOT is not set, assume that we want to build qtbase or top-level. get_filename_component(MODULE_ROOT ".." ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") @@ -76,8 +85,12 @@ while(NOT "${configure_args}" STREQUAL "") elseif(arg STREQUAL "-write-options-for-conan") list(POP_FRONT configure_args options_json_file) elseif(arg STREQUAL "-skip") - list(POP_FRONT configure_args qtrepo) - push("-DBUILD_${qtrepo}=OFF") + list(POP_FRONT configure_args qtrepos) + is_non_empty_valid_arg("${arg}" "${qtrepos}") + list(TRANSFORM qtrepos REPLACE "," ";") + foreach(qtrepo IN LISTS qtrepos) + push("-DBUILD_${qtrepo}=OFF") + endforeach() elseif(arg STREQUAL "-qt-host-path") pop_path_argument() push("-DQT_HOST_PATH=${path}") diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md index 118371518d..7fd0efda17 100644 --- a/cmake/configure-cmake-mapping.md +++ b/cmake/configure-cmake-mapping.md @@ -95,7 +95,7 @@ The following table describes the mapping of configure options to CMake argument | -android-style-assets | -DFEATURE_android_style_assets=ON | | | -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 <repo> | -DBUILD_<repo>=OFF | | +| -skip <repo>,...,<repo_n> | -DBUILD_<repo>=OFF | | | -make <part> | -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 | | | | 'all' target by also passing -DQT_BUILD_TESTS_BY_DEFAULT=OFF or | diff --git a/config_help.txt b/config_help.txt index 839a21bb61..941602eb17 100644 --- a/config_help.txt +++ b/config_help.txt @@ -167,7 +167,9 @@ Build environment: Component selection: - -skip <repo> ......... Exclude an entire repository from the build. + -skip <repo>[,<repo>] Exclude one or more entire repositories from the + build. The list should be separated with commas. + e.g. -skip qtimageformats,qtsvg -make <part> ......... Add <part> to the list of parts to be built. Specifying this option clears the default list first. (allowed values: libs, tools, examples, tests, |