llvm.org GIT mirror llvm / 5b78ac5
Merge 98171 from mainline. 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/branches/release_27@98308 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 10 years ago
1 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
55 # FIXME: This won't work for project files, we need to use a --param.
66 set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}")
77 set(SHLIBEXT "${LTDL_SHLIB_EXT}")
8
9 if(BUILD_SHARED_LIBS)
10 set(LLVM_SHARED_LIBS_ENABLED "1")
11 else()
12 set(LLVM_SHARED_LIBS_ENABLED "0")
13 endif(BUILD_SHARED_LIBS)
14
15 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
16 set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH")
17 else() # Default for all other unix like systems.
18 # CMake hardcodes the library locaction using rpath.
19 # Therefore LD_LIBRARY_PATH is not required to run binaries in the
20 # build dir. We pass it anyways.
21 set(SHLIBPATH_VAR "LD_LIBRARY_PATH")
22 endif()
823
924 include(FindPythonInterp)
1025 if(PYTHONINTERP_FOUND)
2641 -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_BINARY_DIR}/${CMAKE_CFG_INTDIR}#"
2742 -e "s#\@LLVMGCCDIR\@##"
2843 -e "s#\@LLVM_BUILD_MODE\@#${CMAKE_CFG_INTDIR}#"
44 -e "s#\@ENABLE_SHARED\@#${LLVM_SHARED_LIBS_ENABLED}#"
45 -e "s#\@SHLIBPATH_VAR\@#${SHLIBPATH_VAR}#"
2946 ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in >
3047 ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
3148 COMMAND ${PYTHON_EXECUTABLE}