cmake : re-enable GCC -Wshadow
ggml-ci
This commit is contained in:
parent
34889bf810
commit
439e68c1e5
16 changed files with 73 additions and 65 deletions
|
@ -15,9 +15,12 @@ function(llama_add_compile_flags)
|
|||
|
||||
list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn)
|
||||
|
||||
# GCC -Wshadow is way too agressive
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
list(APPEND CXX_FLAGS -Wshadow)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
list(APPEND CXX_FLAGS -Wshadow -Wshadow-field-in-constructor)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND WARNING_FLAGS -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue