1 include(AddLLVM) # for add_lit_testsuite
2 include(HandleLitArguments)
3 macro(pythonize_bool var)
11 pythonize_bool(LIBUNWIND_ENABLE_CET)
12 pythonize_bool(LIBUNWIND_ENABLE_THREADS)
13 pythonize_bool(LIBUNWIND_USES_ARM_EHABI)
15 set(AUTO_GEN_COMMENT "## Autogenerated by libunwind configuration.\n# Do not edit!")
16 set(SERIALIZED_LIT_PARAMS "# Lit parameters serialized here for llvm-lit to pick them up\n")
18 if (LIBUNWIND_EXECUTOR)
19 message(DEPRECATION "LIBUNWIND_EXECUTOR is deprecated, please add executor=... to LIBUNWIND_TEST_PARAMS")
20 serialize_lit_string_param(SERIALIZED_LIT_PARAMS executor "${LIBUNWIND_EXECUTOR}")
23 serialize_lit_param(SERIALIZED_LIT_PARAMS enable_experimental False)
25 if (LLVM_USE_SANITIZER)
26 serialize_lit_string_param(SERIALIZED_LIT_PARAMS use_sanitizer "${LLVM_USE_SANITIZER}")
29 if (CMAKE_CXX_COMPILER_TARGET)
30 serialize_lit_string_param(SERIALIZED_LIT_PARAMS target_triple "${CMAKE_CXX_COMPILER_TARGET}")
32 serialize_lit_string_param(SERIALIZED_LIT_PARAMS target_triple "${LLVM_DEFAULT_TARGET_TRIPLE}")
35 serialize_lit_params_list(SERIALIZED_LIT_PARAMS LIBUNWIND_TEST_PARAMS)
37 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/configs/cmake-bridge.cfg.in"
38 "${CMAKE_CURRENT_BINARY_DIR}/cmake-bridge.cfg"
41 configure_lit_site_cfg(
42 "${LIBUNWIND_TEST_CONFIG}"
43 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
44 MAIN_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py")
46 add_lit_testsuite(check-unwind "Running libunwind tests"
47 ${CMAKE_CURRENT_BINARY_DIR}
48 DEPENDS unwind ${LIBUNWIND_TEST_DEPS})