Skip to content

Commit cc31f7b

Browse files
committed
configure: Simplify handling of the -make and -nomake options
Remove the options '-make libs'. This was doing nothing. We don't have a QT_BUILD_LIBS variable. Remove the option '-make tools'. This was doing nothing. We could map this to QT_FORCE_BUILD_TOOLS=ON, but this would be confusing for desktop builds, because QT_FORCE_BUILD_TOOLS=ON yields an error if QT_HOST_TOOLS is not set. Remove the option '-nomake tools'. This was printing a "not yet implemented warning" without any further effect. This could be mapped to QT_FORCE_BUILD_TOOLS=OFF but people expect different behavior from this option (e.g. disabling all apps). The list of allowed values for -make and -nomake is now in one location: qt_cmdline.cmake, and the superfluous handling of unknown input has been removed from QtProcessConfigureArgs.cmake. Every value of -make / -nomake now maps simply to QT_BUILD_<part>=ON/OFF. Change-Id: I251dd6185d6ae1f22c90b2b8443ba008a6da01f1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
1 parent 220e596 commit cc31f7b

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

cmake/QtProcessConfigureArgs.cmake

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,20 +1002,10 @@ function(check_qt_build_parts type)
10021002
set(buildFlag "FALSE")
10031003
endif()
10041004

1005-
list(APPEND knownParts "tests" "examples" "benchmarks" "manual-tests"
1006-
"minimal-static-tests" "doc-snippets")
1007-
10081005
foreach(part ${${input}})
1009-
if(part IN_LIST knownParts)
1010-
qt_feature_normalize_name("${part}" partUpperCase)
1011-
string(TOUPPER "${partUpperCase}" partUpperCase)
1012-
push("-DQT_BUILD_${partUpperCase}=${buildFlag}")
1013-
continue()
1014-
elseif("${part}" STREQUAL "tools" AND "${type}" STREQUAL "make")
1015-
# default true ignored
1016-
continue()
1017-
endif()
1018-
qtConfAddWarning("'-${type} ${part}' is not implemented yet.")
1006+
qt_feature_normalize_name("${part}" partUpperCase)
1007+
string(TOUPPER "${partUpperCase}" partUpperCase)
1008+
push("-DQT_BUILD_${partUpperCase}=${buildFlag}")
10191009
endforeach()
10201010
set(cmake_args "${cmake_args}" PARENT_SCOPE)
10211011
endfunction()

config_help.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,10 @@ Component selection:
242242
to configure.
243243
-make <part> ......... Add <part> to the list of parts to be built.
244244
Specifying this option clears the default list first.
245-
(allowed values: libs, tools, examples, tests,
245+
(allowed values: examples, tests,
246246
benchmarks, manual-tests, minimal-static-tests,
247-
doc-snippets) [default: libs and examples, also tools
248-
if not cross-building, also tests and doc-snippets if
249-
-developer-build]
247+
doc-snippets)
248+
[default: tests and doc-snippets if -developer-build]
250249
-nomake <part> ....... Exclude <part> from the list of parts to be built.
251250
-install-examples-sources Installs examples source code into the Qt prefix
252251
Only possible when -make examples is also passed

qt_cmdline.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,15 @@ qt_commandline_option(stack-clash-protection TYPE boolean NAME stack_clash_prote
9292
qt_commandline_option(libstdcpp-assertions TYPE boolean NAME libstdcpp_assertions)
9393
qt_commandline_option(libcpp-hardening TYPE boolean NAME libcpp_hardening)
9494
qt_commandline_option(relro-now-linker TYPE boolean NAME relro_now_linker)
95-
qt_commandline_option(make TYPE addString VALUES examples libs tests tools
96-
benchmarks manual-tests minimal-static-tests doc-snippets)
95+
set(allowed_build_parts examples tests benchmarks manual-tests minimal-static-tests doc-snippets)
96+
qt_commandline_option(make TYPE addString VALUES ${allowed_build_parts})
97+
qt_commandline_option(nomake TYPE addString VALUES ${allowed_build_parts})
9798
qt_commandline_option(install-examples-sources
9899
TYPE boolean
99100
CMAKE_VARIABLE QT_INSTALL_EXAMPLES_SOURCES
100101
)
101102
qt_commandline_option(mips_dsp TYPE boolean)
102103
qt_commandline_option(mips_dspr2 TYPE boolean)
103-
qt_commandline_option(nomake TYPE addString VALUES examples tests tools benchmarks
104-
manual-tests minimal-static-tests doc-snippets)
105104
qt_commandline_option(opensource TYPE void NAME commercial VALUE no)
106105
qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug)
107106
qt_commandline_option(optimize-size TYPE boolean NAME optimize_size)

0 commit comments

Comments
 (0)