Skip to content

Commit db59f98

Browse files
committed
Conflict resolution
1 parent f85b51e commit db59f98

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

ggml/CMakeLists.txt

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -362,19 +362,17 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ggml-config.cmake
362362
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ggml)
363363

364364
### 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)
380378
endif()

0 commit comments

Comments
 (0)