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

Support cmake install #4326

Merged
merged 8 commits into from
Nov 24, 2023
Merged

Support cmake install #4326

merged 8 commits into from
Nov 24, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Nov 23, 2023

What

Support and document use of CMake install.
Minimal example has a switch to use find_package. Not rolling it out to others because it's just not as ergonomic, don't want to advertise it all that much. However, the minimal example is used in the sdk package script to test that install is in order before uploading the package script (runs locally). I manually tested the case of a rerun install depend on an arrow system install.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added enhancement New feature or request 🌊 C++ API C/C++ API specific include in changelog labels Nov 23, 2023
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about all the cmake shenanigans but the doc makes sense and I assume you tested that it works so 🟢

@Wumpf
Copy link
Member Author

Wumpf commented Nov 24, 2023

I assume you tested that it works so

image

... not on ci though, but I think I know why.

Base automatically changed from andreas/cpp/cmake-include-path to main November 24, 2023 08:39
@Wumpf Wumpf force-pushed the andreas/cpp/cmake-install branch from 64cd7f3 to 976400b Compare November 24, 2023 08:45
revert previous attempts of putting them elsewhere because link order is important in C++ land...
@Wumpf Wumpf merged commit f18c4cb into main Nov 24, 2023
42 checks passed
@Wumpf Wumpf deleted the andreas/cpp/cmake-install branch November 24, 2023 11:44
Wumpf added a commit that referenced this pull request Nov 27, 2023
…y version (#4330)

### What

* Fixes #3868
* Fixes left over to set generic package version from #4326  
* Yes there's two levels of regex'ing existing files now, but I'm happy
with it because it avoids etching the version into more places: The repo
cmake setup first figures out the rerun version by taking a look at
Cargo.toml and puts that into rerun.h which we commit. Then when doing
an install (in repo or outside!) we check rerun.h's version and put that
into the CMake Install shenanigans


Tests erro'red correctly when I still had a longer string, looked like
this:
```
-------------------------------------------------------------------------------
Scenario: RecordingStream can connect
      Given: a new RecordingStream
-------------------------------------------------------------------------------
/Users/andreas/dev/rerun-io/rerun/rerun_cpp/tests/recording_stream.cpp:433
...............................................................................

/Users/andreas/dev/rerun-io/rerun/rerun_cpp/tests/recording_stream.cpp:433: FAILED:
due to unexpected exception with message:
  Rerun_c SDK version and SDK header/source versions don't match match. Make
  sure to link against the correct version of the rerun_c library.
  Rerun_c version:
  re_sdk 0.11.0-alpha.1+dev [rustc 1.72.1 (d5c2e9c34 2023-09-13), LLVM 16.0.5]
  aarch64-apple-darwin
  SDK header/source version:
  0.11.0-alpha.1+dev
```


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4330) (if
applicable)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4330)
- [Docs
preview](https://rerun.io/preview/72b1b7eedaa4934a8a34d1ab498c9b7752dd8125/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/72b1b7eedaa4934a8a34d1ab498c9b7752dd8125/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific enhancement New feature or request include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide CMake install target setup
2 participants