diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-26 17:28:20 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-04-02 09:39:31 +0200 |
commit | 560e8547b322b067348f57690462332b5943b394 (patch) | |
tree | 5667c0895700922b660935d52f60fabc88e68e6a /cmake/QtBuildInformation.cmake | |
parent | 7dfa00e1ccef3ce9f29d54bde55411da9f71bcc5 (diff) |
CMake: Report which qt parts will be built by default
Like libs, tools, examples, tests. Built by default means
they are part of the default make / ninja target.
Change-Id: I304e5724fc5dbd39626e9d589a6e1e92a4dd7882
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuildInformation.cmake')
-rw-r--r-- | cmake/QtBuildInformation.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake index cf783168f0..8a210a1b08 100644 --- a/cmake/QtBuildInformation.cmake +++ b/cmake/QtBuildInformation.cmake @@ -106,6 +106,8 @@ function(qt_configure_eval_commands) qt_configure_process_add_summary_build_type_and_config(${command_args}) elseif(command_name STREQUAL ADD_BUILD_MODE) qt_configure_process_add_summary_build_mode(${command_args}) + elseif(command_name STREQUAL ADD_BUILD_PARTS) + qt_configure_process_add_summary_build_parts(${command_args}) endif() math(EXPR command_index "${command_index}+1") @@ -285,6 +287,29 @@ function(qt_configure_process_add_summary_build_mode label) qt_configure_add_report_padded("${label}" "${message}") endfunction() +function(qt_configure_add_summary_build_parts) + qt_configure_record_command(ADD_BUILD_PARTS ${ARGV}) +endfunction() + +function(qt_configure_process_add_summary_build_parts label) + set(parts "libs") + + if(BUILD_EXAMPLES AND NOT QT_NO_MAKE_EXAMPLES) + list(APPEND parts "examples") + endif() + + if(BUILD_TESTING AND NOT QT_NO_MAKE_TESTS) + list(APPEND parts "tests") + endif() + + if(NOT CMAKE_CROSSCOMPILING) + list(APPEND parts "tools") + endif() + + string(REPLACE ";" " " message "${parts}") + qt_configure_add_report_padded("${label}" "${message}") +endfunction() + function(qt_configure_add_summary_section) qt_configure_record_command(ADD_SUMMARY_SECTION ${ARGV}) endfunction() |