We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a735ae commit e159e77Copy full SHA for e159e77
cmake/common.cmake
@@ -13,7 +13,12 @@ function(llama_add_compile_flags)
13
list(APPEND C_FLAGS -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes
14
-Werror=implicit-int -Werror=implicit-function-declaration)
15
16
- list(APPEND CXX_FLAGS -Wshadow -Wmissing-declarations -Wmissing-noreturn)
+ list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn)
17
+
18
+ # GCC -Wshadow is way too agressive
19
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
20
+ list(APPEND CXX_FLAGS -Wshadow)
21
+ endif()
22
23
list(APPEND WARNING_FLAGS -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function)
24
0 commit comments