diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-03-10 18:41:59 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-03-10 18:41:59 +0000 |
commit | cbb524e2a9f9bfd94c98a3d887ce752edaadf817 (patch) | |
tree | 59ffe4571cd95dbf4cc7e7aac58eff739c428dd1 /test | |
parent | 72926c264ac48aa3f57620ff7af77d9fd6faf63b (diff) | |
download | external_llvm-cbb524e2a9f9bfd94c98a3d887ce752edaadf817.zip external_llvm-cbb524e2a9f9bfd94c98a3d887ce752edaadf817.tar.gz external_llvm-cbb524e2a9f9bfd94c98a3d887ce752edaadf817.tar.bz2 |
Fix make check with cmake/lit
PR6540: Set the newly introduced variables ENABLE_SHARED and
SHLIBPATH_VAR in lit.site.cfg not only in the autoconf build, but also
in a cmake one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5ad48ef..ab060c9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,6 +7,21 @@ set(TARGETS_TO_BUILD ${TARGETS_BUILT}) set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}") set(SHLIBEXT "${LTDL_SHLIB_EXT}") +if(BUILD_SHARED_LIBS) + set(LLVM_SHARED_LIBS_ENABLED "1") +else() + set(LLVM_SHARED_LIBS_ENABLED "0") +endif(BUILD_SHARED_LIBS) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH") +else() # Default for all other unix like systems. + # CMake hardcodes the library locaction using rpath. + # Therefore LD_LIBRARY_PATH is not required to run binaries in the + # build dir. We pass it anyways. + set(SHLIBPATH_VAR "LD_LIBRARY_PATH") +endif() + include(FindPythonInterp) if(PYTHONINTERP_FOUND) configure_file( @@ -27,6 +42,8 @@ if(PYTHONINTERP_FOUND) -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#" -e "s#\@LLVMGCCDIR\@##" -e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#" + -e "s#\@ENABLE_SHARED\@#${LLVM_SHARED_LIBS_ENABLED}#" + -e "s#\@SHLIBPATH_VAR\@#${SHLIBPATH_VAR}#" ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in > ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg COMMAND ${PYTHON_EXECUTABLE} |