Skip to content

Commit 34fce9d

Browse files
committed
fix win build conflict of math library
1 parent d08c20e commit 34fce9d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakePresets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"cacheVariables": {
2020
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
2121
"CMAKE_CXX_COMPILER": "icx",
22+
"CMAKE_C_COMPILER": "cl",
2223
"GGML_SYCL": "ON",
2324
"CMAKE_INSTALL_RPATH": "$ORIGIN;$ORIGIN/.."
2425
}

ggml/src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,9 @@ target_link_libraries(ggml PRIVATE Threads::Threads ${GGML_EXTRA_LIBS})
11681168

11691169
find_library(MATH_LIBRARY m)
11701170
if (MATH_LIBRARY)
1171-
target_link_libraries(ggml PRIVATE ${MATH_LIBRARY})
1171+
if (NOT WIN32 AND GGML_SYCL)
1172+
target_link_libraries(ggml PRIVATE ${MATH_LIBRARY})
1173+
endif()
11721174
endif()
11731175

11741176
if (BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)