]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
cmake : Abort the build if a requested feature could not be configured (#1350)
authorMarcin Mielniczuk <redacted>
Sat, 7 Oct 2023 19:01:18 +0000 (21:01 +0200)
committerGitHub <redacted>
Sat, 7 Oct 2023 19:01:18 +0000 (20:01 +0100)
CMakeLists.txt

index a0e3c2fdd3b9caf395beb739e6882d32ebcc86d7..4d12d9aa4f99f516b73b978a88e3f3ad0da316c2 100644 (file)
@@ -117,7 +117,7 @@ if (APPLE)
             set(WHISPER_EXTRA_LIBS  ${WHISPER_EXTRA_LIBS}  ${ACCELERATE_FRAMEWORK})
             set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_USE_ACCELERATE)
         else()
-            message(WARNING "Accelerate framework not found")
+            message(FATAL_ERROR "Accelerate framework not found")
         endif()
     endif()
 
@@ -140,7 +140,7 @@ if (APPLE)
                 set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_METAL_NDEBUG)
             endif()
         else()
-            message(WARNING "Metal framework not found")
+            message(FATAL_ERROR "Metal framework not found")
         endif()
 
         set(GGML_SOURCES_METAL ggml-metal.m ggml-metal.h)
@@ -158,7 +158,7 @@ if (APPLE)
 
             set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DWHISPER_USE_COREML)
         else()
-            message(WARNING "CoreML framework not found")
+            message(FATAL_ERROR "CoreML framework not found")
         endif()
 
         if (WHISPER_COREML_ALLOW_FALLBACK)
@@ -181,7 +181,7 @@ if (WHISPER_BLAS)
             include_directories($ENV{OPENBLAS_PATH}/include)
             set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} ${BLAS_LIBRARIES})
         else ()
-            message(WARNING "BLAS library was not found. Environment variable OPENBLAS_PATH not defined.")
+            message(FATAL_ERROR "BLAS library was not found. Environment variable OPENBLAS_PATH not defined.")
         endif ()
     else ()
         set(BLA_STATIC 1)
@@ -198,7 +198,7 @@ if (WHISPER_BLAS)
             include_directories(${BLAS_INCLUDE_DIRS})
             set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} ${BLAS_LIBRARIES})
         else()
-            message(WARNING "BLAS library was not found")
+            message(FATAL_ERROR "BLAS library was not found")
         endif()
     endif ()
 endif ()
@@ -224,7 +224,7 @@ if (WHISPER_CUBLAS)
         endif()
 
     else()
-        message(WARNING "cuBLAS not found")
+        message(FATAL_ERROR "cuBLAS not found")
     endif()
 endif()
 
@@ -255,7 +255,7 @@ if (WHISPER_HIPBLAS)
         endif()
         set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} ggml-rocm)
     else()
-        message(WARNING "hipBLAS or HIP not found. Try setting CMAKE_PREFIX_PATH=/opt/rocm")
+        message(FATAL_ERROR "hipBLAS or HIP not found. Try setting CMAKE_PREFIX_PATH=/opt/rocm")
     endif()
 endif()
 
@@ -270,7 +270,7 @@ if (WHISPER_CLBLAST)
 
         set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} clblast)
     else()
-        message(WARNING "CLBlast not found")
+        message(FATAL_ERROR "CLBlast not found")
     endif()
 endif()