Skip to content

Commit

Permalink
Look for libm and link to it if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-makes-code committed Dec 3, 2024
1 parent ef869d4 commit 69d0fc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "WASI")
list(APPEND qjs_libs ${CMAKE_THREAD_LIBS_INIT})
endif()

# if CC is clang, and the ABI is (.*)-windows-msvc, we don't want to link libm.
xoption(QJS_CLANG_MSVC_ABI "Whether to treat compilation as using Clang's MSVC ABI." OFF)
if(NOT MSVC AND NOT QJS_CLANG_MSVC_ABI)
# try to find libm
find_library(M_LIBRARIES m)
if(M_LIBRARIES)
list(APPEND qjs_libs m)
endif()

Expand Down

0 comments on commit 69d0fc9

Please sign in to comment.