2017-07-06 23:20:12 +08:00
|
|
|
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(LIBUNWIND_BUILD_32_BITS)
|
|
|
|
pythonize_bool(LIBCXX_ENABLE_SHARED)
|
|
|
|
pythonize_bool(LIBUNWIND_ENABLE_SHARED)
|
|
|
|
pythonize_bool(LIBUNWIND_ENABLE_THREADS)
|
2019-12-06 22:26:35 +08:00
|
|
|
pythonize_bool(LIBUNWIND_USES_ARM_EHABI)
|
2019-02-05 12:44:03 +08:00
|
|
|
pythonize_bool(LIBUNWIND_USE_COMPILER_RT)
|
2017-07-06 23:20:12 +08:00
|
|
|
pythonize_bool(LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY)
|
|
|
|
set(LIBUNWIND_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
|
|
|
|
"TargetInfo to use when setting up test environment.")
|
2020-06-12 03:41:38 +08:00
|
|
|
set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../../libcxx")
|
|
|
|
set(LIBUNWIND_EXECUTOR "${Python3_EXECUTABLE} ${LIBUNWIND_LIBCXX_PATH}/utils/run.py" CACHE STRING
|
2017-07-06 23:20:12 +08:00
|
|
|
"Executor to use when running tests.")
|
|
|
|
|
|
|
|
set(AUTO_GEN_COMMENT "## Autogenerated by libunwind configuration.\n# Do not edit!")
|
2020-06-26 00:02:43 +08:00
|
|
|
configure_lit_site_cfg(
|
|
|
|
"${LIBUNWIND_TEST_CONFIG}"
|
2017-07-06 23:20:12 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
2020-06-26 00:02:43 +08:00
|
|
|
MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py")
|
2017-07-06 23:20:12 +08:00
|
|
|
|
|
|
|
add_lit_testsuite(check-unwind "Running libunwind tests"
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2020-08-03 15:40:35 +08:00
|
|
|
DEPENDS unwind ${LIBUNWIND_TEST_DEPS})
|