mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
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
This commit is contained in:
@@ -31,6 +31,8 @@ if(PYTHONINTERP_FOUND)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
||||||
COMMAND ${PYTHON_EXECUTABLE}
|
COMMAND ${PYTHON_EXECUTABLE}
|
||||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||||
|
--param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||||
|
--param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
||||||
-sv
|
-sv
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
DEPENDS
|
DEPENDS
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ if config.test_exec_root is None:
|
|||||||
# configuration hasn't been created by the build system, or we are in an
|
# configuration hasn't been created by the build system, or we are in an
|
||||||
# out-of-tree build situation).
|
# out-of-tree build situation).
|
||||||
|
|
||||||
|
# Check for 'llvm_unit_site_config' user parameter, and use that if available.
|
||||||
|
site_cfg = lit.params.get('llvm_unit_site_config', None)
|
||||||
|
if site_cfg and os.path.exists(site_cfg):
|
||||||
|
lit.load_config(config, site_cfg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
# Try to detect the situation where we are using an out-of-tree build by
|
# Try to detect the situation where we are using an out-of-tree build by
|
||||||
# looking for 'llvm-config'.
|
# looking for 'llvm-config'.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ if config.test_exec_root is None:
|
|||||||
# configuration hasn't been created by the build system, or we are in an
|
# configuration hasn't been created by the build system, or we are in an
|
||||||
# out-of-tree build situation).
|
# out-of-tree build situation).
|
||||||
|
|
||||||
|
# Check for 'llvm_site_config' user parameter, and use that if available.
|
||||||
|
site_cfg = lit.params.get('llvm_site_config', None)
|
||||||
|
if site_cfg and os.path.exists(site_cfg):
|
||||||
|
lit.load_config(config, site_cfg)
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
# Try to detect the situation where we are using an out-of-tree build by
|
# Try to detect the situation where we are using an out-of-tree build by
|
||||||
# looking for 'llvm-config'.
|
# looking for 'llvm-config'.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user