-
Notifications
You must be signed in to change notification settings - Fork 10.8k
/
CMakeLists.txt
44 lines (36 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
add_custom_target(check-libc)
add_custom_target(libc-unit-tests)
add_dependencies(check-libc libc-unit-tests)
add_custom_target(exhaustive-check-libc)
add_custom_target(libc-long-running-tests)
if(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU)
add_subdirectory(UnitTest)
endif()
add_header_library(
errno_setter_matcher
HDRS
ErrnoSetterMatcher.h
DEPENDS
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()
if(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU)
add_subdirectory(src)
add_subdirectory(utils)
endif()
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)