-
Notifications
You must be signed in to change notification settings - Fork 64
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
Set bob install dir to CMAKE_INSTALL_LIBDIR #451
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you.
What is the issue with relinking and $ORIGIN
? Is that for capstone?
I see a handful of locations in bob.cmake where lib
is used explicitly. I'm guessing those should also be changed.
Yes. Capstone builds SCOREC/core and provides the shared libraries with capstone. That capstone library can be linked again to SCOREC (which will be especially necessary if the plugin is provided by default), but the issue I was having was that ld would find the shared libraries (ma.so, mds.so, gmi.so) in the capstone folder instead of the ones I had installed and built (with
I believe those are only CMake targets. I don't know the convention, but the Capstone package includes those in |
Thank you. I think I get the gist of the capstone problem. It looks like the Professional CMake book (19th edition) suggests having a consistent directory for the libraries, <packageName>Config.cmake, and target files.
I didn't find a direct quote for the target files, but all the examples I could find (see pg 524) use the GNUInstallDirs variables. I can help with these modifications and testing if needed. |
Ok, that makes sense. I will update the remaining |
Thank you. I'm going to add a CI test to check that downstream packages can use our cmake package successfully. |
@bobpaw Can you rebase on develop? It now has a CI test for a user build using the installed cmake config file? core/.github/workflows/cmake.yml Lines 48 to 56 in 88a39f6
|
- Fixes issues on 64bit systems when LIBDIR=lib64. CMake would relink to $ORIGIN:$ORIGIN/../lib64 and all the libs would be in lib. Signed-off-by: Aiden Woodruff <[email protected]>
- Update CMake exported target install dir to CMAKE_INSTALL_LIBDIR. - Update executable destination to CMAKE_INSTALL_BINDIR. - Add quotes to directory names in case of spaces. Signed-off-by: Aiden Woodruff <[email protected]>
Signed-off-by: Aiden Woodruff <[email protected]>
76c6958
to
7df25b3
Compare
Thank you. The new test ran without issues. https://github.com/SCOREC/core/actions/runs/10755354998/job/29826921049?pr=451#step:7:1 |
Set bob install dir to CMAKE_INSTALL_LIBDIR