From 62dc8f7d7b72ca8e75c57cd6a100712c631fa5d5 Mon Sep 17 00:00:00 2001 From: Jugal Haresh Sheth <32609058+jugal-sheth@users.noreply.github.com> Date: Tue, 20 May 2025 10:58:25 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) 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 #