]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : update CMakeLists.txt to handle deprecated gpu Warnings (#3163)
authorJugal Haresh Sheth <redacted>
Tue, 20 May 2025 09:58:25 +0000 (10:58 +0100)
committerGitHub <redacted>
Tue, 20 May 2025 09:58:25 +0000 (11:58 +0200)
* 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 <redacted>
CMakeLists.txt

index e6c099d17fd306dbc3a8d115ec1d78c19daaa87c..cf8d3c2003ba66584e3fdc647e4acb9a040564b6 100644 (file)
@@ -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
 #