llvm.org GIT mirror llvm / aefd63d
CMake/lit: Add llvm_{unit_,}site_config parameters, and always pass them when running tests from the project files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90869 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
3 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3030 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
3131 COMMAND ${PYTHON_EXECUTABLE}
3232 ${LLVM_SOURCE_DIR}/utils/lit/lit.py
33 --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
34 --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
3335 -sv
3436 ${CMAKE_CURRENT_BINARY_DIR}
3537 DEPENDS
3131 # configuration hasn't been created by the build system, or we are in an
3232 # out-of-tree build situation).
3333
34 # Check for 'llvm_unit_site_config' user parameter, and use that if available.
35 site_cfg = lit.params.get('llvm_unit_site_config', None)
36 if site_cfg and os.path.exists(site_cfg):
37 lit.load_config(config, site_cfg)
38 raise SystemExit
39
3440 # Try to detect the situation where we are using an out-of-tree build by
3541 # looking for 'llvm-config'.
3642 #
5656 # probably trying to run on a test file directly, and either the site
5757 # configuration hasn't been created by the build system, or we are in an
5858 # out-of-tree build situation).
59
60 # Check for 'llvm_site_config' user parameter, and use that if available.
61 site_cfg = lit.params.get('llvm_site_config', None)
62 if site_cfg and os.path.exists(site_cfg):
63 lit.load_config(config, site_cfg)
64 raise SystemExit
5965
6066 # Try to detect the situation where we are using an out-of-tree build by
6167 # looking for 'llvm-config'.