@@ -361,29 +361,26 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ggml-config.cmake
361
361
${CMAKE_CURRENT_BINARY_DIR} /ggml-version.cmake
362
362
DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/ggml )
363
363
364
- ### The following breaks GGML_CPU_ALL_VARIANTS ###
365
- if (MSVC AND NOT DEFINED GGML_CPU_ALL_VARIANTS )
366
- set (MSVC_WARNING_FLAGS
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
- )
373
- function (disable_msvc_warnings target_name )
374
- if (TARGET ${target_name} )
375
- target_compile_options (${target_name} PRIVATE ${MSVC_WARNING_FLAGS} )
376
- endif ()
377
- endfunction ()
378
-
379
- disable_msvc_warnings (ggml-base )
380
- disable_msvc_warnings (ggml )
381
- disable_msvc_warnings (ggml-cpu )
382
- disable_msvc_warnings (ggml-cpu-x64 )
383
- disable_msvc_warnings (ggml-cpu-sse42 )
384
- disable_msvc_warnings (ggml-cpu-sandybridge )
385
- disable_msvc_warnings (ggml-cpu-haswell )
386
- disable_msvc_warnings (ggml-cpu-skylakex )
387
- disable_msvc_warnings (ggml-cpu-icelake )
388
- disable_msvc_warnings (ggml-cpu-alderlake )
389
- endif ()
364
+ set (MSVC_WARNING_FLAGS
365
+ /wd4005 # Macro redefinition
366
+ /wd4244 # Conversion from one type to another type, possible loss of data
367
+ /wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
368
+ /wd4996 # Disable POSIX deprecation warnings
369
+ /wd4702 # Unreachable code warnings
370
+ )
371
+ function (disable_msvc_warnings target_name )
372
+ if (TARGET ${target_name} )
373
+ target_compile_options (${target_name} PRIVATE ${MSVC_WARNING_FLAGS} )
374
+ endif ()
375
+ endfunction ()
376
+
377
+ disable_msvc_warnings (ggml-base )
378
+ disable_msvc_warnings (ggml )
379
+ disable_msvc_warnings (ggml-cpu )
380
+ disable_msvc_warnings (ggml-cpu-x64 )
381
+ disable_msvc_warnings (ggml-cpu-sse42 )
382
+ disable_msvc_warnings (ggml-cpu-sandybridge )
383
+ disable_msvc_warnings (ggml-cpu-haswell )
384
+ disable_msvc_warnings (ggml-cpu-skylakex )
385
+ disable_msvc_warnings (ggml-cpu-icelake )
386
+ disable_msvc_warnings (ggml-cpu-alderlake )
0 commit comments