mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-30 14:14:41 +02:00
whisper : add option to use system-installed GGML (#2887)
This commit is contained in:
parent
4854789751
commit
60b481d881
@ -62,7 +62,8 @@ option(WHISPER_ALL_WARNINGS "whisper: enable all compiler warnings"
|
|||||||
option(WHISPER_ALL_WARNINGS_3RD_PARTY "whisper: enable all compiler warnings in 3rd party libs" OFF)
|
option(WHISPER_ALL_WARNINGS_3RD_PARTY "whisper: enable all compiler warnings in 3rd party libs" OFF)
|
||||||
|
|
||||||
# build
|
# build
|
||||||
option(WHISPER_FATAL_WARNINGS "whisper: enable -Werror flag" OFF)
|
option(WHISPER_FATAL_WARNINGS "whisper: enable -Werror flag" OFF)
|
||||||
|
option(WHISPER_USE_SYSTEM_GGML "whisper: use system-installed GGML library" OFF)
|
||||||
|
|
||||||
# sanitizers
|
# sanitizers
|
||||||
option(WHISPER_SANITIZE_THREAD "whisper: enable thread sanitizer" OFF)
|
option(WHISPER_SANITIZE_THREAD "whisper: enable thread sanitizer" OFF)
|
||||||
@ -121,7 +122,15 @@ whisper_option_depr(WARNING WHISPER_SYCL_F16 GGML_SYCL_F16)
|
|||||||
#
|
#
|
||||||
|
|
||||||
if (NOT TARGET ggml)
|
if (NOT TARGET ggml)
|
||||||
add_subdirectory(ggml)
|
if (WHISPER_USE_SYSTEM_GGML)
|
||||||
|
find_package(ggml REQUIRED)
|
||||||
|
if (NOT ggml_FOUND)
|
||||||
|
message(FATAL_ERROR "System-installed GGML library not found.")
|
||||||
|
endif()
|
||||||
|
add_library(ggml ALIAS ggml::ggml)
|
||||||
|
else()
|
||||||
|
add_subdirectory(ggml)
|
||||||
|
endif()
|
||||||
# ... otherwise assume ggml is added by a parent CMakeLists.txt
|
# ... otherwise assume ggml is added by a parent CMakeLists.txt
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
Loading…
Reference in New Issue
Block a user