Create symbolic link during install#5277
Conversation
|
See also #4775 Are the two related? |
|
Thanks for pointing out the MR. |
|
After a quick test: Your patch fixes the I added one more fix for staged installs, which are commonly used by package builders and installers. I was not super aware of that workflow either and found it as an issue w/ Codex: DESTDIR=/tmp/amrex-stage cmake --install build --prefix /usr/localThat should place everything under: Before the follow-up, the normal AMReX install rules did that correctly, but the legacy The follow-up makes the legacy symlink behave like the rest of the install, and it also records that link in |
## Summary Cover `--prefix` and `DESTDIR` stage in the CMake install smoke test. ## Additional background Was also reported in #4775 - [x] merge `development` after the fix in #5277 was merged ## Checklist The proposed changes: - [ ] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate
Summary
Setting the install directory in the CMake install step gives an error in the creation of the symlink for
libamrex.a.The proposed fix creates the path for the symlink during the install step, allowing to change
CMAKE_INSTALL_PREFIXin the install step.Basically the fix moves the creation of the path-variable into
cmake_install.cmake.The previous version created the path in CMake configure step and the link during the CMake install step.
Reproducer
Gives the error