File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -362,19 +362,17 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ggml-config.cmake
362
362
DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/ggml )
363
363
364
364
### The following breaks GGML_CPU_ALL_VARIANTS ###
365
- if (NOT DEFINED GGML_CPU_ALL_VARIANTS )
366
- if (MSVC )
367
- set (MSVC_WARNING_FLAGS
368
- /wd4005 # Macro redefinition
369
- /wd4244 # Conversion from one type to another type, possible loss of data
370
- /wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
371
- )
372
- function (disable_msvc_warnings target_name )
373
- target_compile_options (${target_name} PRIVATE ${MSVC_WARNING_FLAGS} )
374
- endfunction ()
375
-
376
- disable_msvc_warnings (ggml-base )
377
- disable_msvc_warnings (ggml )
378
- disable_msvc_warnings (ggml-cpu )
379
- endif ()
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
+ )
371
+ function (disable_msvc_warnings target_name )
372
+ target_compile_options (${target_name} PRIVATE ${MSVC_WARNING_FLAGS} )
373
+ endfunction ()
374
+
375
+ disable_msvc_warnings (ggml-base )
376
+ disable_msvc_warnings (ggml )
377
+ disable_msvc_warnings (ggml-cpu )
380
378
endif ()
You can’t perform that action at this time.
0 commit comments