Description
I'm encountering an issue where the CMAKE_INSTALL_RPATH variable is being overwritten in my CMake project. I have configured it to use $ORIGIN, but it seems that it's being reset to ${CMAKE_INSTALL_FULL_LIBDIR} at line 127 of the CMakeLists.txt file.
ExternalProject_Add(lapack
PREFIX ${LAPACK_ROOT}
URL https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.12.0.tar.gz
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DBUILD_SHARED_LIBS=ON
-DUSE_OPTIMIZED_BLAS=ON
-DCMAKE_INSTALL_RPATH="\$ORIGIN"
-DBUILD_RPATH_USE_ORIGIN=ON
DOWNLOAD_EXTRACT_TIMESTAMP true
BUILD_BYPRODUCTS "${LAPACK_ROOT}/lib/liblapack${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
Proposed Solution
It's suggested that we allow users to set CMAKE_INSTALL_RPATH during the configuration phase, rather than hard-coding it in the CMakeLists.txt file. This would provide users with more flexibility and control over their installation paths.
Checklist
Description
I'm encountering an issue where the
CMAKE_INSTALL_RPATHvariable is being overwritten in my CMake project. I have configured it to use$ORIGIN, but it seems that it's being reset to${CMAKE_INSTALL_FULL_LIBDIR}at line 127 of theCMakeLists.txtfile.Proposed Solution
It's suggested that we allow users to set
CMAKE_INSTALL_RPATHduring the configuration phase, rather than hard-coding it in theCMakeLists.txtfile. This would provide users with more flexibility and control over their installation paths.Checklist