3 @SERIALIZED_LIT_PARAMS@
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.
10 # Individual configuration files can take advantage of this bridge by
11 # loading the file and then setting up the remaining Lit substitutions.
15 site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
16 import libcxx.test.format
18 # Basic configuration of the test suite
19 config.name = os.path.basename('@LIBCXX_TEST_CONFIG@')
20 config.test_source_root = os.path.join('@LIBCXX_SOURCE_DIR@', 'test')
21 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
22 config.recursiveExpansionLimit = 10
23 config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
25 # Add substitutions for bootstrapping the test suite configuration
27 config.substitutions.append(('%{cxx}', shlex.quote('@CMAKE_CXX_COMPILER@')))
28 config.substitutions.append(('%{libcxx}', '@LIBCXX_SOURCE_DIR@'))
29 config.substitutions.append(('%{include}', '@LIBCXX_GENERATED_INCLUDE_DIR@'))
30 config.substitutions.append(('%{target-include}', '@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@'))
31 config.substitutions.append(('%{lib}', '@LIBCXX_LIBRARY_DIR@'))
32 config.substitutions.append(('%{module}', '@LIBCXX_GENERATED_MODULE_DIR@'))
33 config.substitutions.append(('%{test-tools}', '@LIBCXX_TEST_TOOLS_PATH@'))
35 # The test needs to manually rebuild the module. The compiler flags used in the
36 # test need to be the same as the compiler flags used to generate the module.
37 # In the future, when CMake can generated modules this may no longer be
39 # TODO MODULES whether it's possible to remove this substitution.
40 config.substitutions.append(('%{cmake}', '@CMAKE_COMMAND@'))