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

Export CMake targets #497

Open
white238 opened this issue Mar 8, 2022 · 2 comments
Open

Export CMake targets #497

white238 opened this issue Mar 8, 2022 · 2 comments

Comments

@white238
Copy link
Member

white238 commented Mar 8, 2022

SCR is getting large enough that importing is getting cumbersome. For example, updating to v0.3.0 just required this entire file:

https://github.com/LLNL/axom/blob/develop/src%2Fcmake%2Fthirdparty%2FFindSCR.cmake

As well as a lot of extra directories in our host-configs:

https://github.com/LLNL/axom/blob/3fb7909d36255a3cf19325221561f2a6501f70b8/host-configs/ruby-toss_3_x86_64_ib-clang%4010.0.0.cmake#L88-L106

This should be hidden behind an exported CMake config by SCR itself. This would also allow more seamless updates in the future if you add/remove dependencies.

@adammoody
Copy link
Contributor

Thanks @white238 . I'm hoping we can look at this for the next release.

Related: #319

@adammoody
Copy link
Contributor

adammoody commented May 10, 2023

Thanks again for your suggestion, @white238 . Things have improved on this front.

First, one may build SCR from a release tarball. The release tarball is packaged with the source for SCR and many of its component libraries (kvtree, spath, rankstr, redset, shuffile, er, lwgrp, and dtcmp). It compiles all source into a single libscr library. This saves one from having to download and build each component library individually. It's still possible to build each dependency separately, but it's not required.

These tarballs are attached as assets on the Releases page, e.g.,
https://github.com/LLNL/scr/releases/download/v3.0.1/scr-v3.0.1.tgz

Steps to build a release tarball:
https://scr.readthedocs.io/en/v3.0/users/build.html#cmake

Second, we've added an scrConfig.cmake that defines targets including scr::scr and scr::scr-static. These targets add the compile and link flags for SCR and its dependencies. There is a corresponding scrConfig.cmake for both the release tarball and the separate-component build. We still need to cut a new SCR release for the CMake config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants