summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-15 09:56:03 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-15 09:56:03 +0300
commit84db10f27bdb4c8d9edf7f554afdcd2a24e3285a (patch)
tree5f9d5b22cdfee6f147274d85b279d98f8a1bb46b /cmake
parent9aacda409db8606b985a93f675487943846cbc86 (diff)
parentccaec18b3934ee384296b4597bdf462fac66c5a4 (diff)
downloadmariadb-git-84db10f27bdb4c8d9edf7f554afdcd2a24e3285a.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'cmake')
-rw-r--r--cmake/maintainer.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index 49ef80ed11c..ab70ef3aea1 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -1,4 +1,5 @@
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, MariaDB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,11 +34,16 @@ SET(MY_WARNING_FLAGS
-Wnon-virtual-dtor
-Wvla
-Wwrite-strings
- -Werror
)
+FOREACH(F ${MY_WARNING_FLAGS})
+ MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
+ENDFOREACH()
+
+SET(MY_ERROR_FLAGS -Werror)
+
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
- SET(MY_WARNING_FLAGS ${MY_WARNING_FLAGS} -Wno-error=maybe-uninitialized)
+ SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=maybe-uninitialized)
ENDIF()
IF(MYSQL_MAINTAINER_MODE MATCHES "OFF")
@@ -46,7 +52,7 @@ ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
SET(WHERE DEBUG)
ENDIF()
-FOREACH(F ${MY_WARNING_FLAGS})
+FOREACH(F ${MY_ERROR_FLAGS})
MY_CHECK_AND_SET_COMPILER_FLAG(${F} ${WHERE})
ENDFOREACH()