mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
[t:4871] fixing warning options
git-svn-id: file:///svn/toku/tokudb@43489 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
28eb6df387
commit
a4fdd8d636
1 changed files with 4 additions and 5 deletions
|
@ -58,7 +58,6 @@ endfunction(maybe_add_gcov_to_libraries)
|
||||||
|
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
|
||||||
## adds a compiler flag if the compiler supports it
|
## adds a compiler flag if the compiler supports it
|
||||||
macro(set_cflags_if_supported)
|
macro(set_cflags_if_supported)
|
||||||
foreach(flag ${ARGN})
|
foreach(flag ${ARGN})
|
||||||
|
@ -115,13 +114,11 @@ if (CMAKE_C_COMPILER_ID MATCHES Intel)
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -debug all")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -debug all")
|
||||||
|
|
||||||
## set icc warnings
|
## set icc warnings
|
||||||
set(WARN_CFLAGS
|
set(CMAKE_C_FLAGS "-Wcheck ${CMAKE_C_FLAGS}")
|
||||||
-Wcheck ## icc version of -Wextra
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
## set gcc warnings
|
## set gcc warnings
|
||||||
|
set(CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
|
||||||
set(WARN_CFLAGS
|
set(WARN_CFLAGS
|
||||||
-Wextra
|
|
||||||
-Wcast-align
|
-Wcast-align
|
||||||
-Wbad-function-cast
|
-Wbad-function-cast
|
||||||
-Wno-missing-noreturn
|
-Wno-missing-noreturn
|
||||||
|
@ -135,6 +132,8 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_cflags_if_supported(${WARN_CFLAGS})
|
set_cflags_if_supported(${WARN_CFLAGS})
|
||||||
|
## always want these
|
||||||
|
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
|
||||||
|
|
||||||
## function for adding -fvisibility=hidden to targets
|
## function for adding -fvisibility=hidden to targets
|
||||||
function(set_targets_visibility_hidden)
|
function(set_targets_visibility_hidden)
|
||||||
|
|
Loading…
Add table
Reference in a new issue