mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +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)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
||||
## adds a compiler flag if the compiler supports it
|
||||
macro(set_cflags_if_supported)
|
||||
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 icc warnings
|
||||
set(WARN_CFLAGS
|
||||
-Wcheck ## icc version of -Wextra
|
||||
)
|
||||
set(CMAKE_C_FLAGS "-Wcheck ${CMAKE_C_FLAGS}")
|
||||
else()
|
||||
## set gcc warnings
|
||||
set(CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
|
||||
set(WARN_CFLAGS
|
||||
-Wextra
|
||||
-Wcast-align
|
||||
-Wbad-function-cast
|
||||
-Wno-missing-noreturn
|
||||
|
@ -135,6 +132,8 @@ else()
|
|||
endif()
|
||||
|
||||
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(set_targets_visibility_hidden)
|
||||
|
|
Loading…
Add table
Reference in a new issue