summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-03-26 17:28:20 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-04-02 09:39:31 +0200
commit560e8547b322b067348f57690462332b5943b394 (patch)
tree5667c0895700922b660935d52f60fabc88e68e6a
parent7dfa00e1ccef3ce9f29d54bde55411da9f71bcc5 (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>
-rw-r--r--cmake/QtBuildInformation.cmake25
-rw-r--r--configure.cmake1
-rwxr-xr-xutil/cmake/configurejson2cmake.py3
3 files changed, 29 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()
diff --git a/configure.cmake b/configure.cmake
index eecfd6ddf4..52943980a8 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -860,6 +860,7 @@ qt_configure_add_summary_entry(
MESSAGE "Code Coverage Instrumentation"
CONDITION QT_FEATURE_coverage
)
+qt_configure_add_summary_build_parts("Build parts")
qt_configure_add_summary_entry(
ARGS "appstore-compliant"
CONDITION APPLE OR ANDROID OR WINRT OR WIN32
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py
index 8887adb22b..5f60e55ca4 100755
--- a/util/cmake/configurejson2cmake.py
+++ b/util/cmake/configurejson2cmake.py
@@ -1152,6 +1152,9 @@ def processSummaryHelper(ctx, entries, cm_fh):
elif "type" in entry and entry["type"] == "buildMode":
message = entry["message"]
cm_fh.write(f"qt_configure_add_summary_build_mode({message})\n")
+ elif "type" in entry and entry["type"] == "buildParts":
+ message = entry["message"]
+ cm_fh.write(f'qt_configure_add_summary_build_parts("{message}")\n')
elif "section" in entry:
section = entry["section"]
cm_fh.write(f'qt_configure_add_summary_section(NAME "{section}")\n')