diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-04 23:04:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-04 23:04:05 +0000 |
commit | a54c8ea8cfcba3682afb53301b93ecc59fc9897a (patch) | |
tree | 28bacd233ebb9fb5ccba90b816aedc8a01cbe577 /test/CMakeLists.txt | |
parent | 44e895761f289029657a8d066f67f0c9d18693b3 (diff) |
build/cmake: Change to require Python be available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 98 |
1 files changed, 47 insertions, 51 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6bda44b36c..cbad83cae9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,62 +24,58 @@ else() # Default for all other unix like systems. set(SHLIBPATH_VAR "LD_LIBRARY_PATH") endif() -include(FindPythonInterp) -if(PYTHONINTERP_FOUND) - set(LIT_ARGS "${LLVM_LIT_ARGS}") - separate_arguments(LIT_ARGS) +set(LIT_ARGS "${LLVM_LIT_ARGS}") +separate_arguments(LIT_ARGS) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in - ${CMAKE_CURRENT_BINARY_DIR}/site.exp) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in + ${CMAKE_CURRENT_BINARY_DIR}/site.exp) - MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit) +MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit) - # Configuration-time: See Unit/lit.site.cfg.in - set(LLVM_BUILD_MODE "%(build_mode)s") +# Configuration-time: See Unit/lit.site.cfg.in +set(LLVM_BUILD_MODE "%(build_mode)s") - set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) - set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) - set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") - set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) - set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) - set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) +set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) +set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR}) +set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") +set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) +set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED}) +set(SHLIBPATH_VAR ${SHLIBPATH_VAR}) - if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE) - set(ENABLE_ASSERTIONS "1") - else() - set(ENABLE_ASSERTIONS "0") - endif() - - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg - @ONLY) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg - @ONLY) +if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE) + set(ENABLE_ASSERTIONS "1") +else() + set(ENABLE_ASSERTIONS "0") +endif() - add_custom_target(check - 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 - --param build_config=${CMAKE_CFG_INTDIR} - --param build_mode=${RUNTIME_BUILD_MODE} - ${LIT_ARGS} - ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Running LLVM regression tests") - set_target_properties(check PROPERTIES FOLDER "Tests") +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg + @ONLY) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in + ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg + @ONLY) - add_custom_target(check.deps) - add_dependencies(check check.deps) - add_dependencies(check.deps - UnitTests - BugpointPasses LLVMHello - llc lli llvm-ar llvm-as llvm-dis llvm-extract llvm-dwarfdump - llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump macho-dump opt - FileCheck count not) - set_target_properties(check.deps PROPERTIES FOLDER "Tests") +add_custom_target(check + 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 + --param build_config=${CMAKE_CFG_INTDIR} + --param build_mode=${RUNTIME_BUILD_MODE} + ${LIT_ARGS} + ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Running LLVM regression tests") +set_target_properties(check PROPERTIES FOLDER "Tests") -endif() +add_custom_target(check.deps) +add_dependencies(check check.deps) +add_dependencies(check.deps + UnitTests + BugpointPasses LLVMHello + llc lli llvm-ar llvm-as llvm-dis llvm-extract llvm-dwarfdump + llvm-ld llvm-link llvm-mc llvm-nm llvm-objdump macho-dump opt + FileCheck count not) +set_target_properties(check.deps PROPERTIES FOLDER "Tests") |