From 5fea9f8f52810dc50e45f7462a5df9d8ab0a1f37 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 4 Jun 2019 15:14:42 +0200 Subject: cmake: Add warnings_are_errors option for modules, plugins and tools only (i.e. no tests nor examples) this mimics the qmake behavior default value is developer_build Comes with some fixes in qmake since it seems in the qmake built it was not having Werror, now does because we built it with add_qt_tool Change-Id: I6f3237f25a6fedefa958644929e90f13837a12df Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 8344d22c0d..6be7a6edcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,9 @@ include(QtBaseGlobalTargets) option(BUILD_SHARED_LIBS "Build Qt statically or dynamically" ON) set(QT_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) +## Should this Qt be built with Werror? +option(WARNINGS_ARE_ERRORS "Build Qt with warnings as errors" ${FEATURE_developer_build}) + ## Decide whether tools will be built. qt_check_if_tools_will_be_built() -- cgit v1.2.3