danbev commited on
Commit
0c191be
·
1 Parent(s): 60ecd84

examples : include examples in msvc disable warn (ggml/1270)

Browse files

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.

Files changed (1) hide show
  1. ggml/CMakeLists.txt +27 -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
  /wd4996 # Disable POSIX deprecation warnings
371
  /wd4702 # Unreachable code warnings
372
  )
@@ -386,4 +387,30 @@ if (MSVC)
386
  disable_msvc_warnings(ggml-cpu-skylakex)
387
  disable_msvc_warnings(ggml-cpu-icelake)
388
  disable_msvc_warnings(ggml-cpu-alderlake)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
389
  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
+ /wd4566 # Conversion from 'char' to 'wchar_t', possible loss of data
371
  /wd4996 # Disable POSIX deprecation warnings
372
  /wd4702 # Unreachable code warnings
373
  )
 
387
  disable_msvc_warnings(ggml-cpu-skylakex)
388
  disable_msvc_warnings(ggml-cpu-icelake)
389
  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()
416
  endif()