With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.
[oota-llvm.git] / cmake / modules / AddLLVM.cmake
index eaf868801a473047860c2a1ed70dae85074c04a1..26e2a5aed4ed03a4d510ccfe9ca5e30174a2f187 100644 (file)
@@ -571,15 +571,6 @@ function(configure_lit_site_cfg input output)
     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()
-
   # Configuration-time: See Unit/lit.site.cfg.in
   if (CMAKE_CFG_INTDIR STREQUAL ".")
     set(LLVM_BUILD_MODE ".")
@@ -598,7 +589,6 @@ function(configure_lit_site_cfg input output)
 
   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")