xref: /llvm-project/libcxxabi/test/configs/cmake-bridge.cfg.in (revision e236a52a88956968f318fb908c584e5cb80b5b03)
1@AUTO_GEN_COMMENT@
2
3@SERIALIZED_LIT_PARAMS@
4
5#
6# This file performs the bridge between the CMake configuration and the Lit
7# configuration files by setting up the LitConfig object and various Lit
8# substitutions from CMake variables.
9#
10# Individual configuration files can take advantage of this bridge by
11# loading the file and then setting up the remaining Lit substitutions.
12#
13
14import os, site
15site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils'))
16site.addsitedir(os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test'))
17import libcxx.test.format
18
19# Basic configuration of the test suite
20config.name = os.path.basename('@LIBCXXABI_TEST_CONFIG@')
21config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')
22config.test_format = libcxx.test.format.CxxStandardLibraryTest()
23config.recursiveExpansionLimit = 10
24config.test_exec_root = os.path.join('@LIBCXXABI_BINARY_DIR@', 'test')
25
26# TODO: This is a non-standard Lit attribute and we should have another way of accessing this.
27config.host_triple = '@LLVM_HOST_TRIPLE@'
28
29config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@'))
30config.substitutions.append(('%{install-prefix}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@'))
31config.substitutions.append(('%{include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include'))
32config.substitutions.append(('%{cxx-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_DIR@'))
33config.substitutions.append(('%{cxx-target-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include/%{triple}/c++/v1'))
34config.substitutions.append(('%{lib}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_LIBRARY_DIR@'))
35config.substitutions.append(('%{benchmark_flags}', ''))
36
37if @LIBCXXABI_USE_LLVM_UNWINDER@:
38    config.substitutions.append(('%{maybe-include-libunwind}', '-I "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"'))
39else:
40    config.substitutions.append(('%{maybe-include-libunwind}', ''))
41