summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-20 13:01:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-20 17:45:01 +0000
commit71d4e83628a129132b00c7ae3fc525f52c067646 (patch)
tree9cfa8e19c2f367c635560587e61ceed245650d12 /cmake
parent80c2a3987a06abd850944aaa3f88974e157c4c02 (diff)
Add missing -help argument to qt-configure-module
Now it's possible to display a configure help screen per module with qt-configure-module <module-source-dir> -help Fixes: QTBUG-95943 Change-Id: I7d26006246af4b38b5a2ec6deca3f45c5313afec Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1ac947e3af42f8a93d9c85a4bce4f242085c4173) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 024925435e..e9aa7d3259 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -71,6 +71,8 @@ while(NOT "${configure_args}" STREQUAL "")
set(auto_detect_compiler FALSE)
elseif(arg STREQUAL "-list-features")
set(list_features TRUE)
+ elseif(arg MATCHES "^-h(elp)?$")
+ set(display_module_help TRUE)
elseif(arg STREQUAL "-write-options-for-conan")
list(POP_FRONT configure_args options_json_file)
elseif(arg STREQUAL "-skip")
@@ -439,6 +441,26 @@ function(qt_call_function func)
endif()
endfunction()
+if(display_module_help)
+ message([[
+Options:
+ -help, -h ............ Display this help screen
+
+ -feature-<feature> ... Enable <feature>
+ -no-feature-<feature> Disable <feature> [none]
+ -list-features ....... List available features. Note that some features
+ have dedicated command line options as well.
+]])
+
+ set(help_file "${MODULE_ROOT}/config_help.txt")
+ if(EXISTS "${help_file}")
+ file(READ "${help_file}" content)
+ message("${content}")
+ endif()
+
+ return()
+endif()
+
if(list_features)
unset(lines)
foreach(feature ${commandline_known_features})