${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
COMMAND ${PYTHON_EXECUTABLE}
${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
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
# configuration hasn't been created by the build system, or we are in an
# 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
# looking for 'llvm-config'.
#
# configuration hasn't been created by the build system, or we are in an
# 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
# looking for 'llvm-config'.
#