Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting CMAKE_INSTALL_RPATH in CMakeLists.txt #1001

Open
2 tasks done
ahnaf-tahmid-chowdhury opened this issue Mar 27, 2024 · 0 comments
Open
2 tasks done

Overwriting CMAKE_INSTALL_RPATH in CMakeLists.txt #1001

ahnaf-tahmid-chowdhury opened this issue Mar 27, 2024 · 0 comments

Comments

@ahnaf-tahmid-chowdhury
Copy link

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

  • I've included a minimal example to reproduce the issue
  • I'd be willing to make a PR to solve this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant