Skip to content

Commit 08951f9

Browse files
authored
examples : include examples in msvc disable warn (#1270)
This commit adds the examples in the "list" of targets to ignore MSVC warnings. The motivation for this is that currently the examples generate a number of warnings that are ignore/disabled for the core ggml project. This makes for a cleaner output when building.
1 parent 21303b6 commit 08951f9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

CMakeLists.txt

Lines changed: 27 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+
/wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
370371
/wd4996 # Disable POSIX deprecation warnings
371372
/wd4702 # Unreachable code warnings
372373
)
@@ -386,4 +387,30 @@ if (MSVC)
386387
disable_msvc_warnings(ggml-cpu-skylakex)
387388
disable_msvc_warnings(ggml-cpu-icelake)
388389
disable_msvc_warnings(ggml-cpu-alderlake)
390+
391+
if (GGML_BUILD_EXAMPLES)
392+
disable_msvc_warnings(common-ggml)
393+
disable_msvc_warnings(common)
394+
395+
disable_msvc_warnings(mnist-common)
396+
disable_msvc_warnings(mnist-eval)
397+
disable_msvc_warnings(mnist-train)
398+
399+
disable_msvc_warnings(gpt-2-ctx)
400+
disable_msvc_warnings(gpt-2-alloc)
401+
disable_msvc_warnings(gpt-2-backend)
402+
disable_msvc_warnings(gpt-2-sched)
403+
disable_msvc_warnings(gpt-2-quantize)
404+
disable_msvc_warnings(gpt-2-batched)
405+
406+
disable_msvc_warnings(gpt-j)
407+
disable_msvc_warnings(gpt-j-quantize)
408+
409+
disable_msvc_warnings(magika)
410+
disable_msvc_warnings(yolov3-tiny)
411+
disable_msvc_warnings(sam)
412+
413+
disable_msvc_warnings(simple-ctx)
414+
disable_msvc_warnings(simple-backend)
415+
endif()
389416
endif()

0 commit comments

Comments
 (0)