configure: Raise error if -skip/-submodules is used in per-repo build
Specifying the options would do nothing, so it's better to error out early in case the developer accidentally added them. Pick-to: 6.2 6.3 Change-Id: Ia516468a22c3c48e9e84dc78e522e8870186d96b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
7cb2bbd9e7
commit
acaba63260
@ -34,6 +34,14 @@ function(is_non_empty_valid_arg arg value)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(error_in_per_repo_build arg)
|
||||||
|
if(NOT TOP_LEVEL)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"Using option '${arg}' is not allowed in a per-repo build, it only "
|
||||||
|
"works in a top-level build.")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
if("${MODULE_ROOT}" STREQUAL "")
|
if("${MODULE_ROOT}" STREQUAL "")
|
||||||
# If MODULE_ROOT is not set, assume that we want to build qtbase or top-level.
|
# 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}")
|
get_filename_component(MODULE_ROOT ".." ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
@ -85,6 +93,7 @@ while(NOT "${configure_args}" STREQUAL "")
|
|||||||
elseif(arg STREQUAL "-write-options-for-conan")
|
elseif(arg STREQUAL "-write-options-for-conan")
|
||||||
list(POP_FRONT configure_args options_json_file)
|
list(POP_FRONT configure_args options_json_file)
|
||||||
elseif(arg STREQUAL "-skip")
|
elseif(arg STREQUAL "-skip")
|
||||||
|
error_in_per_repo_build("${arg}")
|
||||||
list(POP_FRONT configure_args qtrepos)
|
list(POP_FRONT configure_args qtrepos)
|
||||||
is_non_empty_valid_arg("${arg}" "${qtrepos}")
|
is_non_empty_valid_arg("${arg}" "${qtrepos}")
|
||||||
list(TRANSFORM qtrepos REPLACE "," ";")
|
list(TRANSFORM qtrepos REPLACE "," ";")
|
||||||
@ -92,6 +101,7 @@ while(NOT "${configure_args}" STREQUAL "")
|
|||||||
push("-DBUILD_${qtrepo}=OFF")
|
push("-DBUILD_${qtrepo}=OFF")
|
||||||
endforeach()
|
endforeach()
|
||||||
elseif(arg STREQUAL "-submodules")
|
elseif(arg STREQUAL "-submodules")
|
||||||
|
error_in_per_repo_build("${arg}")
|
||||||
list(POP_FRONT configure_args submodules)
|
list(POP_FRONT configure_args submodules)
|
||||||
is_non_empty_valid_arg("${arg}" "${submodules}")
|
is_non_empty_valid_arg("${arg}" "${submodules}")
|
||||||
list(TRANSFORM submodules REPLACE "," "[[;]]")
|
list(TRANSFORM submodules REPLACE "," "[[;]]")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user