cmake : cont

ggml-ci
This commit is contained in:
Georgi Gerganov 2025-01-12 15:11:52 +02:00
parent e159e7751c
commit 34889bf810
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 5 additions and 2 deletions

View File

@ -16,7 +16,7 @@ function(llama_add_compile_flags)
list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn) list(APPEND CXX_FLAGS -Wmissing-declarations -Wmissing-noreturn)
# GCC -Wshadow is way too agressive # GCC -Wshadow is way too agressive
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND CXX_FLAGS -Wshadow) list(APPEND CXX_FLAGS -Wshadow)
endif() endif()

View File

@ -3,4 +3,7 @@ add_executable(${TARGET} run.cpp)
install(TARGETS ${TARGET} RUNTIME) install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_17) target_compile_features(${TARGET} PRIVATE cxx_std_17)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(${TARGET} PRIVATE -Wno-shadow) # TMP target_compile_options(${TARGET} PRIVATE -Wno-shadow) # TMP
endif()