21 lines · plain
1set(LLVM_LIBC_MPFR_INSTALL_PATH "" CACHE PATH "Path to where MPFR is installed (e.g. C:/src/install or ~/src/install)")2 3if(LLVM_LIBC_MPFR_INSTALL_PATH)4 set(LIBC_TESTS_CAN_USE_MPFR TRUE)5elseif(LIBC_TARGET_OS_IS_GPU OR LLVM_LIBC_FULL_BUILD)6 # In full build mode, the MPFR library should be built using our own facilities,7 # which is currently not possible.8 set(LIBC_TESTS_CAN_USE_MPFR FALSE)9else()10 try_compile(11 LIBC_TESTS_CAN_USE_MPFR12 ${CMAKE_CURRENT_BINARY_DIR}13 SOURCES14 ${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp15 COMPILE_DEFINITIONS16 ${LIBC_COMPILE_OPTIONS_DEFAULT}17 LINK_LIBRARIES18 -lmpfr -lgmp -latomic19 )20endif()21