diff --git a/CMakeLists.txt b/CMakeLists.txt index aef1ee16b..f55a4198c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,12 @@ option(UMF_FORMAT_CODE_STYLE set(UMF_HWLOC_NAME "hwloc" CACHE STRING "Custom name for hwloc library w/o extension") +set(UMF_INSTALL_RPATH + "" + CACHE + STRING + "Set the runtime search path to the directory with dependencies (e.g. hwloc)" +) # Only a part of skips is treated as a failure now. TODO: extend to all tests option(UMF_TESTS_FAIL_ON_SKIP "Treat skips in tests as fail" OFF) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7078d629f..2f7480c81 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -115,6 +115,10 @@ elseif(MACOSX) endif() if(UMF_BUILD_SHARED_LIBRARY) + if(UMF_INSTALL_RPATH) + set(CMAKE_INSTALL_RPATH "${UMF_INSTALL_RPATH}") + endif() + if(NOT UMF_DISABLE_HWLOC) set(HWLOC_LIB ${UMF_HWLOC_NAME}) endif()