mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-01 13:20:25 +00:00
Partial support test polly for out of tree build.
llvm-svn: 130482
This commit is contained in:
parent
ca3bef8461
commit
e1bd40cfbd
@ -5,13 +5,28 @@ set(POLLY_TEST_DIRECTORIES
|
||||
"OpenMP"
|
||||
"polybench")
|
||||
|
||||
set(LLVM_SOURCE_DIR "${LLVM_MAIN_SRC_DIR}")
|
||||
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
|
||||
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/")
|
||||
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib")
|
||||
|
||||
set(POLLY_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||
set(POLLY_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..")
|
||||
|
||||
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
# We are building polly out of tree, adjust the settings.
|
||||
# FIXME: FileCheck is not available in llvm install directory at the moment.
|
||||
set(LLVM_LIT ${LLVM_INSTALL_ROOT}/bin/llvm-lit)
|
||||
set(POLLY_TEST_DEPS LLVMPolly)
|
||||
|
||||
set(LLVM_BINARY_DIR "${LLVM_INSTALL_ROOT}")
|
||||
set(LLVM_TOOLS_DIR "${LLVM_INSTALL_ROOT}/bin")
|
||||
set(LLVM_LIBS_DIR "${LLVM_INSTALL_ROOT}/lib")
|
||||
else (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
set(LLVM_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit)
|
||||
set(POLLY_TEST_DEPS opt lli LLVMPolly)
|
||||
|
||||
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
|
||||
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/")
|
||||
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib")
|
||||
endif (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||
@ -30,23 +45,21 @@ if(PYTHONINTERP_FOUND)
|
||||
|
||||
foreach(testdir ${POLLY_TEST_DIRECTORIES})
|
||||
add_custom_target(polly-test-${testdir}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||
COMMAND ${LLVM_LIT}
|
||||
--param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
--param build_config=${CMAKE_CFG_INTDIR}
|
||||
-sv ${POLLY_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${testdir}
|
||||
DEPENDS opt LLVMPolly
|
||||
DEPENDS ${POLLY_TEST_DEPS}
|
||||
COMMENT "Running Polly regression tests in ${testdir}")
|
||||
endforeach()
|
||||
|
||||
add_custom_target(polly-test
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${LLVM_SOURCE_DIR}/utils/lit/lit.py
|
||||
COMMAND ${LLVM_LIT}
|
||||
--param polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
||||
--param build_config=${CMAKE_CFG_INTDIR}
|
||||
-sv ${POLLY_TEST_EXTRA_ARGS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS opt LLVMPolly
|
||||
DEPENDS ${POLLY_TEST_DEPS}
|
||||
COMMENT "Running Polly regression tests")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user