diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-06-04 15:14:42 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2019-06-05 13:10:16 +0000 |
commit | 5fea9f8f52810dc50e45f7462a5df9d8ab0a1f37 (patch) | |
tree | da4dd731e41cd3381815cb925aedd5dc47797325 /CMakeLists.txt | |
parent | e5d66406928c9baa190cd2e57783849d8ad67fd5 (diff) |
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
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() |