Skip to content

Commit 26ec08a

Browse files
danbevMinh141120
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 b702324 commit 26ec08a

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
@@ -369,6 +369,7 @@ if (MSVC)
369369
/wd4005 # Macro redefinition
370370
/wd4244 # Conversion from one type to another type, possible loss of data
371371
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
372+
/wd4305 # Conversion from 'type1' to 'type2', possible loss of data
372373
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
373374
/wd4996 # Disable POSIX deprecation warnings
374375
/wd4702 # Unreachable code warnings
@@ -415,4 +416,20 @@ if (MSVC)
415416
disable_msvc_warnings(simple-ctx)
416417
disable_msvc_warnings(simple-backend)
417418
endif()
419+
420+
if (GGML_BUILD_TESTS)
421+
disable_msvc_warnings(test-mul-mat)
422+
disable_msvc_warnings(test-arange)
423+
disable_msvc_warnings(test-backend-ops)
424+
disable_msvc_warnings(test-cont)
425+
disable_msvc_warnings(test-conv-transpose)
426+
disable_msvc_warnings(test-conv-transpose-1d)
427+
disable_msvc_warnings(test-conv1d)
428+
disable_msvc_warnings(test-conv2d)
429+
disable_msvc_warnings(test-conv2d-dw)
430+
disable_msvc_warnings(test-customop)
431+
disable_msvc_warnings(test-dup)
432+
disable_msvc_warnings(test-opt)
433+
disable_msvc_warnings(test-pool)
434+
endif ()
418435
endif()

0 commit comments

Comments
 (0)