build: fix build error in Windows env with OneAPI setup (llama/10107)

This commit is contained in:
Zhenwei Jin 2024-11-01 11:09:59 +08:00 committed by Georgi Gerganov
parent 3e231ab9cc
commit 5f6b992eea

View File

@ -1402,7 +1402,7 @@ list(APPEND GGML_EXTRA_LIBS_PRIVATE Threads::Threads)
find_library(MATH_LIBRARY m)
if (MATH_LIBRARY)
if (NOT WIN32 OR NOT GGML_SYCL)
if (NOT WIN32 OR NOT DEFINED ENV{ONEAPI_ROOT})
list(APPEND GGML_EXTRA_LIBS_PRIVATE m)
endif()
endif()