Commit 4d8fb604 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4871] fixing warning options

git-svn-id: file:///svn/toku/tokudb@43489 c7de825b-a66e-492c-adef-691d508d4ae1
parent cdb39d8f
...@@ -58,7 +58,6 @@ endfunction(maybe_add_gcov_to_libraries) ...@@ -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) ...@@ -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() ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment