Included more math functions to Windows's entrypoints and made a cmake option (-DLLVM_LIBC_MPFR_INSTALL_PATH) where the user can specify the install path where the MPFR library was built so it can be linked. The try_compile was moved to LLVMLibCCheckMPFR.cmake, so the variable that is set after this process can retain its value in other files of the same parent file. A direct reason for this is for LIBC_TESTS_CAN_USE_MPFR to be true when the user specifies MPFR's path and retain its value even after leaving the file. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D106894
15 lines
389 B
CMake
15 lines
389 B
CMake
set(LLVM_LIBC_MPFR_INSTALL_PATH "" CACHE PATH "Path to where MPFR is installed (e.g. C:/src/install or ~/src/install)")
|
|
|
|
if(LLVM_LIBC_MPFR_INSTALL_PATH)
|
|
set(LIBC_TESTS_CAN_USE_MPFR TRUE)
|
|
else()
|
|
try_compile(
|
|
LIBC_TESTS_CAN_USE_MPFR
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
SOURCES
|
|
${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp
|
|
LINK_LIBRARIES
|
|
-lmpfr -lgmp
|
|
)
|
|
endif()
|