Bundle C++ to SDK to artifact that can be used with CMake's fetch_content#3875
Merged
Bundle C++ to SDK to artifact that can be used with CMake's fetch_content#3875
Conversation
emilk
approved these changes
Oct 17, 2023
| set(RERUN_REPOSITORY YES) | ||
|
|
||
| # Set version number. | ||
| # Read it from the Rust toml with a regex so we don't have another place to maintain! |
teh-cmc
approved these changes
Oct 17, 2023
Contributor
teh-cmc
left a comment
There was a problem hiding this comment.
Looks fantastic.
I just wish we did the same for arrow-cpp now!
Member
Author
my gut feeling tells me this will be way harder, but I haven't tried! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Change CMakeLists.txt in rerun_cpp to work standalone with add_directory.
When used in this fashion it expects the
RERUN_C_LIBvariable to be set. The default for it points to a locallibfolder with appropriately named libs.This in turn gives rise to a very trivial bundling strategy:
This is done in the new
build_and_upload_rerun_cppscript which on top of the above also takes care of testing the resulting artifact by running the now also compatible minimal example outside of the repo.Another smaller necessary change is that the rerun.h C header is now copied into the rerun_cpp sdk with a patched version number in the comment. This is primarily so to keep the above process super simple and shave of an additional include directory.
Draft until PR ci confirmed to be working.(PR checks only the linux artifact, main ci checks the full artifact and puts it on the Development Release notes)
With this change, the minimal possible cmake script for a project using Rerun is:
Checklist