Add missing newline to debug statement.
[llvm.git] / test / CMakeLists.txt
blob433af900dd2b4bc4ab5b64fc9dbfed7153b53fcc
1 foreach(c ${LLVM_TARGETS_TO_BUILD})
2   set(TARGETS_BUILT "${TARGETS_BUILT} ${c}")
3 endforeach(c)
4 set(TARGETS_TO_BUILD ${TARGETS_BUILT})
6 # FIXME: This won't work for project files, we need to use a --param.
7 set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}")
8 set(SHLIBEXT "${LTDL_SHLIB_EXT}")
10 if(BUILD_SHARED_LIBS)
11   set(LLVM_SHARED_LIBS_ENABLED "1")
12 else()
13   set(LLVM_SHARED_LIBS_ENABLED "0")
14 endif(BUILD_SHARED_LIBS)
16 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
17   set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH")
18 else() # Default for all other unix like systems.
19   # CMake hardcodes the library locaction using rpath.
20   # Therefore LD_LIBRARY_PATH is not required to run binaries in the
21   # build dir. We pass it anyways. 
22   set(SHLIBPATH_VAR "LD_LIBRARY_PATH")
23 endif()
25 include(FindPythonInterp)
26 if(PYTHONINTERP_FOUND)
27   configure_file(
28     ${CMAKE_CURRENT_SOURCE_DIR}/site.exp.in
29     ${CMAKE_CURRENT_BINARY_DIR}/site.exp)
31   MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/Unit)
33   add_custom_target(check
34     COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
35                 -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
36                 -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
37                 -e "s#\@LLVMGCCDIR\@##"
38                 -e "s#\@PYTHON_EXECUTABLE\@#${PYTHON_EXECUTABLE}#"
39                 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
40                 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
41     COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#"
42                 -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#"
43                 -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
44                 -e "s#\@LLVMGCCDIR\@##"
45                 -e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#"
46                 -e "s#\@ENABLE_SHARED\@#${LLVM_SHARED_LIBS_ENABLED}#"
47                 -e "s#\@SHLIBPATH_VAR\@#${SHLIBPATH_VAR}#"
48                 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in >
49                 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
50     COMMAND ${PYTHON_EXECUTABLE}
51                 ${LLVM_SOURCE_DIR}/utils/lit/lit.py
52                 --param llvm_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
53                 --param llvm_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
54                 -sv
55                 ${CMAKE_CURRENT_BINARY_DIR}
56                 DEPENDS
57                 COMMENT "Running LLVM regression tests")
59 endif()