llvm-project/libc/utils/MPFRWrapper/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
388 B
CMake
Raw Normal View History

try_compile(
LIBC_TESTS_CAN_USE_MPFR
${CMAKE_CURRENT_BINARY_DIR}
SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/check_mpfr.cpp
LINK_LIBRARIES
-lmpfr -lgmp
)
if(LIBC_TESTS_CAN_USE_MPFR)
add_library(libcMPFRWrapper
MPFRUtils.cpp
MPFRUtils.h
)
target_link_libraries(libcMPFRWrapper -lmpfr -lgmp)
else()
message(WARNING "Math tests using MPFR will be skipped.")
endif()