2014-07-10 10:20:11 +08:00
|
|
|
macro(pythonize_bool var)
|
|
|
|
if (${var})
|
|
|
|
set(${var} True)
|
|
|
|
else()
|
|
|
|
set(${var} False)
|
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
2016-04-19 20:47:38 +08:00
|
|
|
if (NOT DEFINED LIBCXX_ENABLE_SHARED)
|
|
|
|
set(LIBCXX_ENABLE_SHARED ON)
|
|
|
|
endif()
|
|
|
|
|
2016-06-02 10:18:31 +08:00
|
|
|
pythonize_bool(LIBCXXABI_BUILD_32_BITS)
|
2016-04-19 20:47:38 +08:00
|
|
|
pythonize_bool(LIBCXX_ENABLE_SHARED)
|
2014-07-10 10:20:11 +08:00
|
|
|
pythonize_bool(LIBCXXABI_ENABLE_SHARED)
|
2014-11-25 06:42:03 +08:00
|
|
|
pythonize_bool(LIBCXXABI_ENABLE_THREADS)
|
2016-05-31 20:01:32 +08:00
|
|
|
pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS)
|
2014-07-11 23:36:02 +08:00
|
|
|
pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
|
2016-03-17 18:00:24 +08:00
|
|
|
pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
|
2015-02-26 23:55:01 +08:00
|
|
|
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.")
|
2014-07-10 10:20:11 +08:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2016-04-19 20:47:38 +08:00
|
|
|
if (LIBCXXABI_ENABLE_SHARED)
|
|
|
|
set(LIBCXXABI_TEST_DEPS cxxabi_shared)
|
|
|
|
else()
|
|
|
|
set(LIBCXXABI_TEST_DEPS cxxabi_static)
|
|
|
|
endif()
|
|
|
|
|
2014-07-10 10:20:11 +08:00
|
|
|
if (NOT LIBCXXABI_BUILT_STANDALONE)
|
|
|
|
list(APPEND LIBCXXABI_TEST_DEPS cxx)
|
|
|
|
endif()
|
|
|
|
|
2014-07-11 23:36:02 +08:00
|
|
|
if (LIBCXXABI_USE_LLVM_UNWINDER)
|
|
|
|
list(APPEND LIBCXXABI_TEST_DEPS unwind)
|
|
|
|
endif()
|
|
|
|
|
2014-07-10 10:20:11 +08:00
|
|
|
add_lit_testsuite(check-libcxxabi "Running libcxxabi tests"
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
DEPENDS ${LIBCXXABI_TEST_DEPS}
|
|
|
|
)
|