Skip to content

Commit c7c18f3

Browse files
committed
cmake : link math library [no ci]
1 parent 3978393 commit c7c18f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ggml/src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,11 @@ target_compile_features (ggml PUBLIC c_std_11) # don't bump
11621162

11631163
target_link_libraries(ggml PRIVATE Threads::Threads ${GGML_EXTRA_LIBS})
11641164

1165+
find_library(MATH_LIBRARY m)
1166+
if (MATH_LIBRARY)
1167+
target_link_libraries(ggml PRIVATE ${MATH_LIBRARY})
1168+
endif()
1169+
11651170
add_library(ggml_static STATIC $<TARGET_OBJECTS:ggml>)
11661171

11671172
if (BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)