The libc.src.__support.FPUtil.fputil target encompassed many unrelated files, and provided a lot of hidden dependencies. This patch splits out all of these files into component parts and cleans up the cmake files that used them. It does not touch any source files for simplicity, but there may be changes made to them in future patches. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D132980
26 lines
782 B
CMake
26 lines
782 B
CMake
if(LIBC_TESTS_CAN_USE_MPFR)
|
|
add_library(libcMPFRWrapper
|
|
MPFRUtils.cpp
|
|
MPFRUtils.h
|
|
)
|
|
add_compile_options(
|
|
-O3
|
|
)
|
|
add_dependencies(
|
|
libcMPFRWrapper
|
|
libc.src.__support.CPP.string_view
|
|
libc.src.__support.CPP.type_traits
|
|
libc.src.__support.FPUtil.fp_bits
|
|
libc.src.__support.FPUtil.platform_defs
|
|
LibcUnitTest
|
|
libc_test_utils
|
|
)
|
|
if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
|
|
target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
|
|
target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
|
|
endif()
|
|
target_link_libraries(libcMPFRWrapper LibcFPTestHelpers LibcUnitTest mpfr gmp libc_test_utils)
|
|
else()
|
|
message(WARNING "Math tests using MPFR will be skipped.")
|
|
endif()
|