Spaces:
Running
Running
ggml : disable warnings for tests when using MSVC (ggml/1273)
Browse files* 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
- ggml/CMakeLists.txt +17 -0
ggml/CMakeLists.txt
CHANGED
|
@@ -367,6 +367,7 @@ if (MSVC)
|
|
| 367 |
/wd4005 # Macro redefinition
|
| 368 |
/wd4244 # Conversion from one type to another type, possible loss of data
|
| 369 |
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
|
|
|
|
| 370 |
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
|
| 371 |
/wd4996 # Disable POSIX deprecation warnings
|
| 372 |
/wd4702 # Unreachable code warnings
|
|
@@ -413,4 +414,20 @@ if (MSVC)
|
|
| 413 |
disable_msvc_warnings(simple-ctx)
|
| 414 |
disable_msvc_warnings(simple-backend)
|
| 415 |
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
endif()
|
|
|
|
| 367 |
/wd4005 # Macro redefinition
|
| 368 |
/wd4244 # Conversion from one type to another type, possible loss of data
|
| 369 |
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
|
| 370 |
+
/wd4305 # Conversion from 'type1' to 'type2', possible loss of data
|
| 371 |
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
|
| 372 |
/wd4996 # Disable POSIX deprecation warnings
|
| 373 |
/wd4702 # Unreachable code warnings
|
|
|
|
| 414 |
disable_msvc_warnings(simple-ctx)
|
| 415 |
disable_msvc_warnings(simple-backend)
|
| 416 |
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 ()
|
| 433 |
endif()
|