CMakeLists.txt
1.79 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
include(AddLLVM) # for add_lit_testsuite
macro(pythonize_bool var)
if (${var})
set(${var} True)
else()
set(${var} False)
endif()
endmacro()
if (NOT DEFINED LIBCXX_ENABLE_SHARED)
set(LIBCXX_ENABLE_SHARED ON)
endif()
pythonize_bool(LIBCXXABI_BUILD_32_BITS)
pythonize_bool(LIBCXX_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_ENABLE_THREADS)
pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS)
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
pythonize_bool(LIBCXXABI_USE_COMPILER_RT)
pythonize_bool(LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
pythonize_bool(LIBCXX_ENABLE_PARALLEL_ALGORITHMS)
pythonize_bool(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX)
pythonize_bool(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI)
set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
"TargetInfo to use when setting up test environment.")
set(LIBCXXABI_EXECUTOR "None" CACHE STRING
"Executor to use when running tests.")
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")
if (LIBCXXABI_ENABLE_SHARED)
set(LIBCXXABI_TEST_DEPS cxxabi_shared)
else()
set(LIBCXXABI_TEST_DEPS cxxabi_static)
endif()
if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
endif()
if (NOT LIBCXXABI_STANDALONE_BUILD)
list(APPEND LIBCXXABI_TEST_DEPS cxx)
if (LIBCXXABI_USE_LLVM_UNWINDER)
list(APPEND LIBCXXABI_TEST_DEPS unwind)
endif()
endif()
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
add_lit_testsuite(check-cxxabi "Running libcxxabi tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${LIBCXXABI_TEST_DEPS}
)
# TODO: This is a legacy target name and should be removed at some point.
add_custom_target(check-libcxxabi DEPENDS check-cxxabi)