From: Daniel Bevenius Date: Fri, 13 Jun 2025 13:06:42 +0000 (+0200) Subject: ggml : disable warnings for tests when using MSVC (ggml/1273) X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=ffe5400d1b7185a971f84d2b685345a79967ed30;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : disable warnings for tests when using MSVC (ggml/1273) * ggml : disable warnings for tests when using MSVC This commit disables warnings for tests on windows when using MSVC. The motivation for this is that this brings the build output more inline with what Linux/MacOS systems produce. There is still one warning generated for the tests which is: ```console Building Custom Rule C:/ggml/tests/CMakeLists.txt cl : command line warning D9025: overriding '/DNDEBUG' with '/UNDEBUG' [C:\ggml\build\tests\test-arange.vcxproj] test-arange.cpp test-arange.vcxproj -> C:\ggml\build\bin\Release\test-arange.exe ``` * ggml : fix typo in tests disable list --- diff --git a/ggml/CMakeLists.txt b/ggml/CMakeLists.txt index f528a2b2..a8804e29 100644 --- a/ggml/CMakeLists.txt +++ b/ggml/CMakeLists.txt @@ -367,6 +367,7 @@ if (MSVC) /wd4005 # Macro redefinition /wd4244 # Conversion from one type to another type, possible loss of data /wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data + /wd4305 # Conversion from 'type1' to 'type2', possible loss of data /wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data /wd4996 # Disable POSIX deprecation warnings /wd4702 # Unreachable code warnings @@ -413,4 +414,20 @@ if (MSVC) disable_msvc_warnings(simple-ctx) disable_msvc_warnings(simple-backend) endif() + + if (GGML_BUILD_TESTS) + disable_msvc_warnings(test-mul-mat) + disable_msvc_warnings(test-arange) + disable_msvc_warnings(test-backend-ops) + disable_msvc_warnings(test-cont) + disable_msvc_warnings(test-conv-transpose) + disable_msvc_warnings(test-conv-transpose-1d) + disable_msvc_warnings(test-conv1d) + disable_msvc_warnings(test-conv2d) + disable_msvc_warnings(test-conv2d-dw) + disable_msvc_warnings(test-customop) + disable_msvc_warnings(test-dup) + disable_msvc_warnings(test-opt) + disable_msvc_warnings(test-pool) + endif () endif()