cmake : enable -Wshadow for C++ code [no ci]

This commit is contained in:
Georgi Gerganov 2025-01-11 17:52:45 +02:00
parent c05e8c9934
commit e7564c5023
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -13,7 +13,7 @@ function(llama_add_compile_flags)
list(APPEND C_FLAGS -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes
-Werror=implicit-int -Werror=implicit-function-declaration)
list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn)
list(APPEND CXX_FLAGS -Wshadow -Wmissing-declarations -Wmissing-noreturn)
list(APPEND WARNING_FLAGS -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function)