llvm-project/libcxxabi/test/CMakeLists.txt

48 lines
1.3 KiB
CMake

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(LLVM_BUILD_32_BITS)
pythonize_bool(LIBCXX_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
pythonize_bool(LIBCXXABI_ENABLE_THREADS)
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
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!")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@ONLY)
if (LIBCXXABI_ENABLE_SHARED)
set(LIBCXXABI_TEST_DEPS cxxabi_shared)
else()
set(LIBCXXABI_TEST_DEPS cxxabi_static)
endif()
if (NOT LIBCXXABI_BUILT_STANDALONE)
list(APPEND LIBCXXABI_TEST_DEPS cxx)
endif()
if (LIBCXXABI_USE_LLVM_UNWINDER)
list(APPEND LIBCXXABI_TEST_DEPS unwind)
endif()
add_lit_testsuite(check-libcxxabi "Running libcxxabi tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${LIBCXXABI_TEST_DEPS}
)