Skip to content

Commit f5bd3e0

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 fcceaad commit f5bd3e0

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
@@ -373,6 +373,7 @@ if (MSVC)
373373
/wd4005 # Macro redefinition
374374
/wd4244 # Conversion from one type to another type, possible loss of data
375375
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
376+
/wd4305 # Conversion from 'type1' to 'type2', possible loss of data
376377
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
377378
/wd4996 # Disable POSIX deprecation warnings
378379
/wd4702 # Unreachable code warnings
@@ -419,4 +420,20 @@ if (MSVC)
419420
disable_msvc_warnings(simple-ctx)
420421
disable_msvc_warnings(simple-backend)
421422
endif()
423+
424+
if (GGML_BUILD_TESTS)
425+
disable_msvc_warnings(test-mul-mat)
426+
disable_msvc_warnings(test-arange)
427+
disable_msvc_warnings(test-backend-ops)
428+
disable_msvc_warnings(test-cont)
429+
disable_msvc_warnings(test-conv-transpose)
430+
disable_msvc_warnings(test-conv-transpose-1d)
431+
disable_msvc_warnings(test-conv1d)
432+
disable_msvc_warnings(test-conv2d)
433+
disable_msvc_warnings(test-conv2d-dw)
434+
disable_msvc_warnings(test-customop)
435+
disable_msvc_warnings(test-dup)
436+
disable_msvc_warnings(test-opt)
437+
disable_msvc_warnings(test-pool)
438+
endif ()
422439
endif()

0 commit comments

Comments
 (0)