35 lines · plain
1if(LIBC_TESTS_CAN_USE_MPC)2 add_library(libcMPCWrapper STATIC3 MPCUtils.cpp4 MPCUtils.h5 mpc_inc.h6 )7 _get_common_test_compile_options(compile_options "" "")8 list(REMOVE_ITEM compile_options "-ffreestanding")9 target_compile_options(libcMPCWrapper PRIVATE -O3 ${compile_options})10 add_dependencies(11 libcMPCWrapper12 libcMPCommon13 libc.hdr.stdint_proxy14 libc.src.__support.CPP.array15 libc.src.__support.CPP.string16 libc.src.__support.CPP.stringstream17 libc.src.__support.CPP.type_traits18 libc.src.__support.FPUtil.fp_bits19 libc.src.__support.complex_type20 LibcTest.unit21 )22 if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})23 target_include_directories(libcMPCWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)24 target_link_directories(libcMPCWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)25 endif()26 if(EXISTS ${LIBC_MPC_INSTALL_PATH})27 target_include_directories(libcMPCWrapper PUBLIC ${LIBC_MPC_INSTALL_PATH}/include)28 target_link_directories(libcMPCWrapper PUBLIC ${LIBC_MPC_INSTALL_PATH}/lib)29 endif()30 target_include_directories(libcMPCWrapper PUBLIC ${LIBC_SOURCE_DIR})31 target_link_libraries(libcMPCWrapper PUBLIC libcMPCommon LibcFPTestHelpers.unit LibcTest.unit mpc)32elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)33 message(WARNING "Math tests using MPC will be skipped.")34endif()35