cmake : re-enable GCC -Wshadow

ggml-ci
This commit is contained in:
Georgi Gerganov 2025-01-12 15:29:33 +02:00
parent 34889bf810
commit 439e68c1e5
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
16 changed files with 73 additions and 65 deletions

View file

@ -4,6 +4,11 @@ install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_17)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${TARGET} PRIVATE -Wno-shadow) # TMP
# TMP
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${TARGET} PRIVATE -Wno-shadow)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${TARGET} PRIVATE -Wno-shadow-field-in-constructor)
endif()
endif()