2009-09-22 15:38:44 +08:00
|
|
|
foreach(c ${LLVM_TARGETS_TO_BUILD})
|
|
|
|
set(TARGETS_BUILT "${TARGETS_BUILT} ${c}")
|
|
|
|
endforeach(c)
|
|
|
|
set(TARGETS_TO_BUILD ${TARGETS_BUILT})
|
|
|
|
|
2009-11-08 17:29:52 +08:00
|
|
|
# FIXME: This won't work for project files, we need to use a --param.
|
|
|
|
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}")
|
|
|
|
set(SHLIBEXT "${LTDL_SHLIB_EXT}")
|
|
|
|
|
2009-09-22 15:38:44 +08:00
|
|
|
include(FindPythonInterp)
|
|
|
|
if(PYTHONINTERP_FOUND)
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/site.exp)
|
|
|
|
|
2009-11-08 17:08:00 +08:00
|
|
|
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
|
|
|
|
|
|
|
|
add_custom_target(check
|
2009-09-22 15:38:44 +08:00
|
|
|
COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
|
|
|
|
-e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
|
2009-11-08 17:08:00 +08:00
|
|
|
-e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
|
|
|
|
-e "s#\@LLVMGCCDIR\@##"
|
2009-09-22 15:38:44 +08:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
2009-11-08 17:07:51 +08:00
|
|
|
COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
|
|
|
|
-e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
|
2009-11-08 17:08:00 +08:00
|
|
|
-e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
|
|
|
|
-e "s#\@LLVMGCCDIR\@##"
|
2009-11-08 17:07:51 +08:00
|
|
|
-e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in >
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
2009-11-08 17:08:00 +08:00
|
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
2009-09-22 15:38:44 +08:00
|
|
|
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
2009-12-09 03:47:36 +08:00
|
|
|
--param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
|
|
--param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
2009-09-22 15:38:44 +08:00
|
|
|
-sv
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
DEPENDS
|
|
|
|
COMMENT "Running LLVM regression tests")
|
|
|
|
|
2009-11-08 17:08:00 +08:00
|
|
|
endif()
|