llvm-capstone/libc/cmake/modules/LLVMLibCCheckMPFR.cmake
Joseph Huber 22a5593b03 [libc] Don't try to use MPFR with the GPU build for now
Summary:
We don't have the infastructure to support MPFR on the GPU. We should
disable this categorically on GPU builds for now.
2023-02-08 08:51:47 -06:00

17 lines
466 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)
elseif(LIBC_TARGET_ARCHITECTURE_IS_GPU)
set(LIBC_TESTS_CAN_USE_MPFR FALSE)
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()