Home | History | Annotate | Download | only in test
      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 
     10 if (NOT DEFINED LIBCXX_ENABLE_SHARED)
     11   set(LIBCXX_ENABLE_SHARED ON)
     12 endif()
     13 
     14 pythonize_bool(LIBCXXABI_BUILD_32_BITS)
     15 pythonize_bool(LIBCXX_ENABLE_SHARED)
     16 pythonize_bool(LIBCXXABI_ENABLE_SHARED)
     17 pythonize_bool(LIBCXXABI_ENABLE_THREADS)
     18 pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS)
     19 pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER)
     20 pythonize_bool(LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
     21 set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING
     22     "TargetInfo to use when setting up test environment.")
     23 set(LIBCXXABI_EXECUTOR "None" CACHE STRING
     24     "Executor to use when running tests.")
     25 
     26 set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")
     27 
     28 if (LIBCXXABI_ENABLE_SHARED)
     29   set(LIBCXXABI_TEST_DEPS cxxabi_shared)
     30 else()
     31   set(LIBCXXABI_TEST_DEPS cxxabi_static)
     32 endif()
     33 
     34 if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
     35   list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
     36 endif()
     37 
     38 if (NOT LIBCXXABI_STANDALONE_BUILD)
     39   list(APPEND LIBCXXABI_TEST_DEPS cxx)
     40   if (LIBCXXABI_USE_LLVM_UNWINDER)
     41     list(APPEND LIBCXXABI_TEST_DEPS unwind)
     42   endif()
     43 endif()
     44 
     45 
     46 configure_lit_site_cfg(
     47   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
     48   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
     49 
     50 add_lit_testsuite(check-cxxabi "Running libcxxabi tests"
     51   ${CMAKE_CURRENT_BINARY_DIR}
     52   DEPENDS ${LIBCXXABI_TEST_DEPS}
     53   )
     54 
     55 # TODO: This is a legacy target name and should be removed at some point.
     56 add_custom_target(check-libcxxabi DEPENDS check-cxxabi)
     57