Skip to content

Commit ffe5400

Browse files
danbevggerganov
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 1b01c0c commit ffe5400

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
@@ -367,6 +367,7 @@ if (MSVC)
367367
/wd4005 # Macro redefinition
368368
/wd4244 # Conversion from one type to another type, possible loss of data
369369
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
370+
/wd4305 # Conversion from 'type1' to 'type2', possible loss of data
370371
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
371372
/wd4996 # Disable POSIX deprecation warnings
372373
/wd4702 # Unreachable code warnings
@@ -413,4 +414,20 @@ if (MSVC)
413414
disable_msvc_warnings(simple-ctx)
414415
disable_msvc_warnings(simple-backend)
415416
endif()
417+
418+
if (GGML_BUILD_TESTS)
419+
disable_msvc_warnings(test-mul-mat)
420+
disable_msvc_warnings(test-arange)
421+
disable_msvc_warnings(test-backend-ops)
422+
disable_msvc_warnings(test-cont)
423+
disable_msvc_warnings(test-conv-transpose)
424+
disable_msvc_warnings(test-conv-transpose-1d)
425+
disable_msvc_warnings(test-conv1d)
426+
disable_msvc_warnings(test-conv2d)
427+
disable_msvc_warnings(test-conv2d-dw)
428+
disable_msvc_warnings(test-customop)
429+
disable_msvc_warnings(test-dup)
430+
disable_msvc_warnings(test-opt)
431+
disable_msvc_warnings(test-pool)
432+
endif ()
416433
endif()

0 commit comments

Comments
 (0)