1include(AddLLVM) # for add_lit_testsuite 2macro(pythonize_bool var) 3 if (${var}) 4 set(${var} True) 5 else() 6 set(${var} False) 7 endif() 8endmacro() 9 10if (NOT DEFINED LIBCXX_ENABLE_SHARED) 11 set(LIBCXX_ENABLE_SHARED ON) 12endif() 13 14pythonize_bool(LIBUNWIND_BUILD_32_BITS) 15pythonize_bool(LIBCXX_ENABLE_SHARED) 16pythonize_bool(LIBUNWIND_ENABLE_SHARED) 17pythonize_bool(LIBUNWIND_ENABLE_THREADS) 18pythonize_bool(LIBUNWIND_USES_ARM_EHABI) 19pythonize_bool(LIBUNWIND_USE_COMPILER_RT) 20pythonize_bool(LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY) 21set(LIBUNWIND_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING 22 "TargetInfo to use when setting up test environment.") 23set(LIBUNWIND_EXECUTOR "${Python3_EXECUTABLE} ${LIBUNWIND_LIBCXX_PATH}/utils/run.py" CACHE STRING 24 "Executor to use when running tests.") 25 26set(AUTO_GEN_COMMENT "## Autogenerated by libunwind configuration.\n# Do not edit!") 27configure_lit_site_cfg( 28 "${LIBUNWIND_TEST_CONFIG}" 29 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg 30 MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py") 31 32add_lit_testsuite(check-unwind "Running libunwind tests" 33 ${CMAKE_CURRENT_BINARY_DIR} 34 DEPENDS unwind ${LIBUNWIND_TEST_DEPS} 35 PARAMS "${LIBUNWIND_TEST_PARAMS}") 36