blob: fbe4ba92fdd47d9840ac2725c214192d909354bc [file] [log] [blame]
add_custom_target(check-libc)
add_custom_target(libc-unit-tests)
add_custom_target(libc-hermetic-tests)
add_dependencies(check-libc libc-unit-tests libc-hermetic-tests)
add_custom_target(exhaustive-check-libc)
add_custom_target(libc-long-running-tests)
add_subdirectory(UnitTest)
add_header_library(
errno_setter_matcher
HDRS
ErrnoSetterMatcher.h
DEPENDS
libc.src.__support.common
libc.src.__support.FPUtil.fp_bits
libc.src.__support.StringUtil.error_to_string
libc.src.errno.errno
)
if(LIBC_TARGET_ARCHITECTURE_IS_GPU AND
(NOT TARGET libc.utils.gpu.loader OR NOT TARGET libc.startup.gpu.crt1))
message(WARNING "Cannot build libc GPU tests, missing loader implementation")
return()
endif()
add_subdirectory(src)
add_subdirectory(utils)
if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_BAREMETAL)
add_subdirectory(IntegrationTest)
endif()
if(NOT LLVM_LIBC_FULL_BUILD)
return()
endif()
if(NOT ${LIBC_TARGET_OS} STREQUAL "linux" AND
NOT ${LIBC_TARGET_OS} STREQUAL "gpu")
# Integration tests are currently only available for linux and the GPU.
return()
endif()
add_subdirectory(integration)