configure: Switch error to warning when -skip used in per-repo build

Yield a warning instead of an error that -skip and -submodules have
no effect in a per-repo build.

Amends acaba632605ac22aa3da4c3cf8e5891cb9cde657
Adjusts to 11ae0e772cccd3028771c1380f077c605224cc19

Pick-to: 6.2 6.3
Change-Id: Ic26b0ba29e48be5162f13ad75308f8358d8878e3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2022-02-07 12:02:06 +01:00
parent 76bdbeb862
commit 94b158134c

View File

@ -34,11 +34,9 @@ function(is_non_empty_valid_arg arg value)
endif() endif()
endfunction() endfunction()
function(error_in_per_repo_build arg) function(warn_in_per_repo_build arg)
if(NOT TOP_LEVEL) if(NOT TOP_LEVEL)
message(FATAL_ERROR message(WARNING "Command line option ${arg} is only effective in top-level builds")
"Using option '${arg}' is not allowed in a per-repo build, it only "
"works in a top-level build.")
endif() endif()
endfunction() endfunction()
@ -93,7 +91,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}") warn_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 "," ";")
@ -101,7 +99,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}") warn_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 "," "[[;]]")