blob: c982f2232088a3d8e2a2c514e264a9e606f502fb [file] [edit]
if(LIBC_TESTS_CAN_USE_MPC)
add_library(libc.utils.MPCWrapper STATIC
MPCUtils.cpp
MPCUtils.h
mpc_inc.h
)
_get_common_test_compile_options(compile_options "" "")
list(REMOVE_ITEM compile_options "-ffreestanding")
target_compile_options(libc.utils.MPCWrapper PRIVATE ${compile_options})
add_dependencies(
libc.utils.MPCWrapper
libc.utils.MPCommon
libc.hdr.stdint_proxy
libc.src.__support.CPP.array
libc.src.__support.CPP.string
libc.src.__support.CPP.stringstream
libc.src.__support.CPP.type_traits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.complex_type
libc.test.UnitTest.FPTestHelpers
libc.test.UnitTest.LibcTest
)
if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
target_include_directories(libc.utils.MPCWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
target_link_directories(libc.utils.MPCWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
endif()
if(EXISTS ${LIBC_MPC_INSTALL_PATH})
target_include_directories(libc.utils.MPCWrapper PUBLIC ${LIBC_MPC_INSTALL_PATH}/include)
target_link_directories(libc.utils.MPCWrapper PUBLIC ${LIBC_MPC_INSTALL_PATH}/lib)
endif()
target_include_directories(libc.utils.MPCWrapper PUBLIC ${LIBC_SOURCE_DIR})
target_link_libraries(libc.utils.MPCWrapper PUBLIC libc.utils.MPCommon mpc)
elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
message(WARNING "Math tests using MPC will be skipped.")
endif()