Skip to content

Commit a0a25a7

Browse files
danbevqnixsynapse
authored andcommitted
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
1 parent eb182fa commit a0a25a7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ggml/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ if (MSVC)
368368
/wd4005 # Macro redefinition
369369
/wd4244 # Conversion from one type to another type, possible loss of data
370370
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
371+
/wd4305 # Conversion from 'type1' to 'type2', possible loss of data
371372
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
372373
/wd4996 # Disable POSIX deprecation warnings
373374
/wd4702 # Unreachable code warnings
@@ -414,4 +415,20 @@ if (MSVC)
414415
disable_msvc_warnings(simple-ctx)
415416
disable_msvc_warnings(simple-backend)
416417
endif()
418+
419+
if (GGML_BUILD_TESTS)
420+
disable_msvc_warnings(test-mul-mat)
421+
disable_msvc_warnings(test-arange)
422+
disable_msvc_warnings(test-backend-ops)
423+
disable_msvc_warnings(test-cont)
424+
disable_msvc_warnings(test-conv-transpose)
425+
disable_msvc_warnings(test-conv-transpose-1d)
426+
disable_msvc_warnings(test-conv1d)
427+
disable_msvc_warnings(test-conv2d)
428+
disable_msvc_warnings(test-conv2d-dw)
429+
disable_msvc_warnings(test-customop)
430+
disable_msvc_warnings(test-dup)
431+
disable_msvc_warnings(test-opt)
432+
disable_msvc_warnings(test-pool)
433+
endif ()
417434
endif()

0 commit comments

Comments
 (0)