Skip to content

Commit

Permalink
Makes CMAKE_INSTALL_RPATH_USE_LINK_PATH and CMAKE_INSTALL_RPATH cache…
Browse files Browse the repository at this point in the history
… variables to improve compatibility with Spack
  • Loading branch information
ilumsden committed Oct 18, 2024
1 parent 98fb978 commit 23601e4
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cmake/modules/SetupCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

# Add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "")

set(CMAKE_INSTALL_RPATH "${DYAD_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_RPATH "${DYAD_INSTALL_LIBDIR}" CACHE STRING "")

list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${DYAD_INSTALL_LIBDIR}" _IS_SYSTEM_DIR)
Expand Down
2 changes: 0 additions & 2 deletions src/dyad/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ set(DYAD_CTX_PRIVATE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/dyad_ctx.h

add_library(${PROJECT_NAME}_core SHARED ${DYAD_CORE_SRC}
${DYAD_CORE_PUBLIC_HEADERS} ${DYAD_CORE_PRIVATE_HEADERS})
# set_target_properties(${PROJECT_NAME}_core PROPERTIES CMAKE_INSTALL_RPATH
# "${DYAD_INSTALL_LIBDIR}")
target_link_libraries(${PROJECT_NAME}_core PRIVATE Jansson::Jansson flux::core)
target_link_libraries(${PROJECT_NAME}_core PRIVATE ${PROJECT_NAME}_ctx ${PROJECT_NAME}_utils
${PROJECT_NAME}_murmur3 ${PROJECT_NAME}_dtl)
Expand Down
2 changes: 0 additions & 2 deletions src/dyad/dtl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ endif()

add_library(${PROJECT_NAME}_dtl SHARED ${DTL_SRC} ${DTL_PUBLIC_HEADERS} ${DTL_PRIVATE_HEADERS})
target_link_libraries(${PROJECT_NAME}_dtl PRIVATE ${PROJECT_NAME}_utils Jansson::Jansson flux::core flux::optparse)
# set_target_properties(${PROJECT_NAME}_dtl PROPERTIES CMAKE_INSTALL_RPATH
# "${DYAD_INSTALL_LIBDIR}")

if(DYAD_ENABLE_UCX_DTL OR DYAD_ENABLE_UCX_DATA_RMA)
target_link_libraries(${PROJECT_NAME}_dtl PRIVATE ucx::ucp ucx::ucs)
Expand Down
2 changes: 0 additions & 2 deletions src/dyad/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ set(DYAD_MODULE_PUBLIC_HEADERS)
add_library(${PROJECT_NAME} SHARED ${DYAD_MODULE_SRC}
${DYAD_MODULE_PRIVATE_HEADERS} ${DYAD_MODULE_PUBLIC_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
# set_target_properties(${PROJECT_NAME} PROPERTIES CMAKE_INSTALL_RPATH
# "${DYAD_INSTALL_LIBDIR}")
target_link_libraries(${PROJECT_NAME} PRIVATE Jansson::Jansson)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_dtl)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_ctx)
Expand Down
2 changes: 0 additions & 2 deletions src/dyad/stream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ set(DYAD_FSTREAM_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/dya

add_library(${PROJECT_NAME}_fstream SHARED ${DYAD_FSTREAM_SRC}
${DYAD_FSTREAM_PRIVATE_HEADERS} ${DYAD_FSTREAM_PUBLIC_HEADERS})
# set_target_properties(${PROJECT_NAME}_fstream PROPERTIES CMAKE_INSTALL_RPATH
# "${DYAD_INSTALL_LIBDIR}")
target_compile_features(${PROJECT_NAME}_fstream PRIVATE)
target_link_libraries(${PROJECT_NAME}_fstream PRIVATE ${PROJECT_NAME}_ctx ${PROJECT_NAME}_core
${PROJECT_NAME}_utils flux::core)
Expand Down

0 comments on commit 23601e4

Please sign in to comment.