Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / cmake / modules / LLVMLibCCheckMPFR.cmake
blob9e361f5fd811289fc4f01fb49dfccd98372d030e
1 set(LLVM_LIBC_MPFR_INSTALL_PATH "" CACHE PATH "Path to where MPFR is installed (e.g. C:/src/install or ~/src/install)")
3 if(LLVM_LIBC_MPFR_INSTALL_PATH)
4   set(LIBC_TESTS_CAN_USE_MPFR TRUE)
5 elseif(LIBC_TARGET_ARCHITECTURE_IS_GPU)
6   set(LIBC_TESTS_CAN_USE_MPFR FALSE)
7 else()
8   try_compile(
9     LIBC_TESTS_CAN_USE_MPFR
10     ${CMAKE_CURRENT_BINARY_DIR}
11     SOURCES
12     ${LIBC_SOURCE_DIR}/utils/MPFRWrapper/check_mpfr.cpp
13     LINK_LIBRARIES
14       -lmpfr -lgmp
15   )
16 endif()