CMakeLists.txt 1.2 KB

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