summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-11-02 16:22:04 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-11-02 20:50:43 +0100
commit83ecb65ec0a2d23435844e076d8ac1cc1f28cb90 (patch)
treec0672ed3ede542ccc5ed14e41252a22e652d3ed7
parent4d3f5ac0cc731a1120154f707bceb57eb4ddabe2 (diff)
CMake: Propagate usage of WARNINGS_ARE_ERRORS when building repos
When configuring a qtbase developer build, WARNINGS_ARE_ERRORS is set to ON and -Werror flags are added to the PlatformInternal targets. But the value of WARNINGS_ARE_ERRORS is not exported. This means that CMake code can't make decisions based on that variable when building other repos, and we now have such code with the new syncqt.cpp in qt_internal_target_sync_headers. Export the value of WARNINGS_ARE_ERRORS in QtBuildInternalsExtra.cmake.in. Fixes: QTBUG-108151 Change-Id: I5de2633fcb1f20fead7d436c201852424e726842 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
-rw-r--r--cmake/QtBuildInternalsExtra.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
index d259194ec2..49d929b666 100644
--- a/cmake/QtBuildInternalsExtra.cmake.in
+++ b/cmake/QtBuildInternalsExtra.cmake.in
@@ -103,6 +103,9 @@ set(QT_BUILD_EXAMPLES_AS_EXTERNAL "@QT_BUILD_EXAMPLES_AS_EXTERNAL@" CACHE BOOL
# Propagate usage of ccache.
set(QT_USE_CCACHE @QT_USE_CCACHE@ CACHE BOOL "Enable the use of ccache")
+# Propragate the value of WARNINGS_ARE_ERRORS.
+set(WARNINGS_ARE_ERRORS "@WARNINGS_ARE_ERRORS@" CACHE BOOL "Build Qt with warnings as errors")
+
# Propagate usage of versioned hard link.
set(QT_CREATE_VERSIONED_HARD_LINK "@QT_CREATE_VERSIONED_HARD_LINK@" CACHE BOOL
"Enable the use of versioned hard link")