[polly] r279733 - Use configure_lit_site_cfg instead of configure_file.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 05:03:34 PDT 2016
Author: meinersbur
Date: Thu Aug 25 07:03:33 2016
New Revision: 279733
URL: http://llvm.org/viewvc/llvm-project?rev=279733&view=rev
Log:
Use configure_lit_site_cfg instead of configure_file.
configure_lit_site_cfg defines some more parameters that are used in
lit.site.cfg.in. configure_file would leave those empty. These additional
definitions seem to be unimportant for regression tests, but unittests do not
work without them.
In case of out-of-tree builds, define the additional parameters with default
values. These may not take all configuration parameters into account, as
configure_lit_site_cfg would.
Modified:
polly/trunk/test/CMakeLists.txt
Modified: polly/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/CMakeLists.txt?rev=279733&r1=279732&r2=279733&view=diff
==============================================================================
--- polly/trunk/test/CMakeLists.txt (original)
+++ polly/trunk/test/CMakeLists.txt Thu Aug 25 07:03:33 2016
@@ -37,6 +37,21 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(POLLY_TEST_EXTRA_ARGS ${POLLY_TEST_EXTRA_ARGS} "--vg")
endif ()
+ # Parameters required for lit.site.cfg.in
+ set(LLVM_SOURCE_DIR ${LLVM_SOURCE_ROOT})
+ if (CMAKE_CFG_INTDIR STREQUAL ".")
+ set(LLVM_BUILD_MODE ".")
+ else ()
+ set(LLVM_BUILD_MODE "%(build_mode)s")
+ endif ()
+ set(ENABLE_SHARED "1")
+ set(SHLIBDIR "${LLVM_BINARY_DIR}/bin")
+ set(LINK_POLLY_INTO_TOOLS "OFF")
+
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
+
foreach(testdir ${POLLY_TEST_DIRECTORIES})
add_custom_target(polly-test-${testdir}
COMMAND ${LLVM_LIT}
@@ -70,6 +85,10 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
set(POLLY_LIB_DIR "${LLVM_LIBS_DIR}")
+ configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
+
add_lit_testsuite(check-polly "Running polly regression tests"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS polly_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
@@ -92,10 +111,6 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR)
endif (NOT DEFINED LLVM_MAIN_SRC_DIR)
configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
-
-configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/update_check.py
${CMAKE_CURRENT_BINARY_DIR}/update_check.py)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/update_check.py
More information about the llvm-commits
mailing list