diff options
author | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
commit | d8536dfbddbf98df10081bdbf83b2c06cf9d01c1 (patch) | |
tree | e02f9ec4f4f64535006e2aeecf1ec1497146b50c /configure.cmake | |
parent | 33e9d05c086a54ec0cd3860acdc01585e0d4fda6 (diff) | |
download | mariadb-git-d8536dfbddbf98df10081bdbf83b2c06cf9d01c1.tar.gz |
Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake index df71a96ee47..14e561b86ef 100644 --- a/configure.cmake +++ b/configure.cmake @@ -54,6 +54,15 @@ IF(NOT SYSTEM_TYPE) ENDIF() +# Always enable -Wall for gnu C/C++ +IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +ENDIF() +IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") +ENDIF() + + IF(CMAKE_COMPILER_IS_GNUCXX) # MySQL "canonical" GCC flags. At least -fno-rtti flag affects # ABI and cannot be simply removed. |