Skip to content

Commit d3b183f

Browse files
more clever way to exclude libm if needed
check GGML_SYCL and ONEAPI_ROOT state rather than generator name.
1 parent 89c533a commit d3b183f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ list(APPEND GGML_EXTRA_LIBS_PRIVATE Threads::Threads)
14001400

14011401
find_library(MATH_LIBRARY m)
14021402
if (MATH_LIBRARY)
1403-
if ((NOT WIN32 OR NOT GGML_SYCL) AND NOT CMAKE_GENERATOR MATCHES "Visual Studio*")
1403+
if (NOT WIN32 OR NOT (GGML_SYCL OR DEFINED ENV{ONEAPI_ROOT}))
14041404
list(APPEND GGML_EXTRA_LIBS_PRIVATE m)
14051405
endif()
14061406
endif()

0 commit comments

Comments
 (0)