From: Jugal Haresh Sheth Date: Tue, 20 May 2025 09:58:25 +0000 (+0100) Subject: whisper : update CMakeLists.txt to handle deprecated gpu Warnings (#3163) X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=62dc8f7d7b72ca8e75c57cd6a100712c631fa5d5;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : update CMakeLists.txt to handle deprecated gpu Warnings (#3163) * Fix CMakeLists.txt to handle deprecated gpu Warnings * Conditionally apply -Wno-deprecated-gpu-targets only when GGML_CUDA is enabled * Conditionally apply -Wno-deprecated-gpu-targets only when GGML_CUDA is enabled and not MSVC --------- Co-authored-by: Jugal Sheth --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e6c099d1..cf8d3c20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,11 @@ whisper_option_depr(WARNING WHISPER_SYCL GGML_SYCL) whisper_option_depr(WARNING WHISPER_SYCL_F16 GGML_SYCL_F16) whisper_option_depr(WARNING WHISPER_CCACHE GGML_CCACHE) +if (GGML_CUDA AND NOT MSVC) + #GGML_CUDA enabled, add the necessary compile options -Wno-deprecated-gpu-targets + add_compile_options(-Wno-deprecated-gpu-targets) +endif() + # # build the library #