From 52722e92ac58ab4a24760bc569f213e503cd2e15 Mon Sep 17 00:00:00 2001 From: "Martin D. Weinberg" Date: Wed, 6 Nov 2024 10:23:10 -0500 Subject: [PATCH] Add rpath rewriting on install by default; update exputil config to include HDF5++ library needed by ParticleReader --- CMakeLists.txt | 3 +++ exputil/CMakeLists.txt | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d22f3e97..70a4dc531 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,9 @@ endif() # Required compiler features add_compile_options(-D_REENTRANT) +# Bake in library paths (esp. useful for HPC sites with modules) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + # Check and enforce that we are a git repository. Necessary for # submodules to work correctly. if(EXISTS "${PROJECT_SOURCE_DIR}/.git") diff --git a/exputil/CMakeLists.txt b/exputil/CMakeLists.txt index 9ccb58eca..c785e5817 100644 --- a/exputil/CMakeLists.txt +++ b/exputil/CMakeLists.txt @@ -51,9 +51,9 @@ set(common_INCLUDE_DIRS $ ${DEP_INC} ${EIGEN3_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS} ${FFTW_INCLUDE_DIRS}) -set(common_LINKLIB ${DEP_LIB} OpenMP::OpenMP_CXX MPI::MPI_CXX - yaml-cpp ${VTK_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES} - ${FFTW_DOUBLE_LIB}) +set(common_LINKLIB ${DEP_LIB} OpenMP::OpenMP_CXX MPI::MPI_CXX yaml-cpp + ${VTK_LIBRARIES} ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES} + ${HDF5_HL_LIBRARIES} ${FFTW_DOUBLE_LIB}) if(ENABLE_CUDA) list(APPEND common_LINKLIB CUDA::toolkit CUDA::cudart)