forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend C++ RecordingStream with global/thread_local/flush/save/connec…
…t APIs & introduce C++ SDK tests (rerun-io#2890) * Part of rerun-io#2516 (SDK! Not codegen! :)) * Next in the cpp series after rerun-io#2874 ### What Adds a test dependency to the [Catch2](https://github.com/catchorg/Catch2/) testing framework in order to start testing all the new RecordingStream features added here. C++ tests can be conveniently run via `./rerun_cpp/build_and_run_tests.sh` now! For quick api overview start with the `rerun.h` and `recording_stream.h` headers. Fixes a range of compiler warnings as a consequence of improving some of the CMake setup, more to do there! Adds lots more documentation to RecordingStream as well. Next steps: * Add C++ to ci (linting, running this test suite) * Add roundtrip tests * Add codegen custom code injection * Improve API usability in varous places, including * rerun-io#2873 * add other tests * serialize unions * serialize datatypes nested in unions, structs and lists * more testing & roundtripping ### 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/2890) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2890) - [Docs preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp-api%2Fbetter-recording-stream/docs) - [Examples preview](https://rerun.io/preview/pr%3Aandreas%2Fcpp-api%2Fbetter-recording-stream/examples)
- Loading branch information
Showing
20 changed files
with
806 additions
and
240 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
cmake_minimum_required(VERSION 3.19) | ||
|
||
project(rerun_cpp_proj LANGUAGES CXX) | ||
|
||
function(set_default_warning_settings target) | ||
if(MSVC) | ||
target_compile_options(${target} PRIVATE /W4 /WX) | ||
else() | ||
target_compile_options(${target} PRIVATE -Wall -Wextra -Wpedantic -Wcast-align -Wcast-qual -Wformat=2 -Wmissing-include-dirs -Wnull-dereference -Woverloaded-virtual -Wpointer-arith -Wshadow -Wswitch-enum -Wvla -Wno-sign-compare -Wconversion -Wunused -Wold-style-cast -Wno-missing-braces) | ||
|
||
# arrow has a bunch of unused parameters in its headers. | ||
target_compile_options(${target} PRIVATE -Wno-unused-parameter) | ||
endif() | ||
|
||
# Enable this to fail on warnings. | ||
# set_property(TARGET ${target} PROPERTY COMPILE_WARNING_AS_ERROR ON) | ||
endfunction() | ||
|
||
if(NOT DEFINED CMAKE_GENERATOR AND UNIX) | ||
set(CMAKE_GENERATOR "Unix Makefiles") | ||
endif() | ||
|
||
add_subdirectory(rerun_cpp) # The Rerun C++ SDK library | ||
add_subdirectory(examples/cpp/minimal) |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.