-
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.
Combined both binary format codes into one rep.
- Loading branch information
0 parents
commit 9578c07
Showing
19 changed files
with
1,848 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SBCBinaryFormat | ||
|
||
Here you will find all the code required to build and read a SBC binary format. | ||
|
||
Languages supported: | ||
|
||
* C++ | ||
* Python |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 3.14...3.22) | ||
|
||
# ---- Project ---- | ||
|
||
# Note: update this to your new project's name and version | ||
project( | ||
SBCBinaryFormat | ||
VERSION 0.5.0 | ||
LANGUAGES CXX C | ||
) | ||
|
||
option(SBC_BINARY_FORMAT_TESTS "Enable" OFF) | ||
|
||
# Note: globbing sources is considered bad practice as CMake's generators may not detect new files | ||
# automatically. Keep that in mind when changing files, or explicitly mention them here. | ||
file(GLOB_RECURSE headers CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") | ||
|
||
# ---- Create library ---- | ||
|
||
# Note: for header-only libraries change all PUBLIC flags to INTERFACE and create an interface | ||
# target: add_library(${PROJECT_NAME} INTERFACE) | ||
add_library(${PROJECT_NAME} ${headers} INTERFACE) | ||
|
||
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_20) | ||
#set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20) | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
) | ||
|
||
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) | ||
|
||
if(SBC_BINARY_FORMAT_TESTS) | ||
add_subdirectory(test) | ||
endif() |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# C++ SBC Binary Format driver | ||
|
||
A header-only library for the SBC binary format. | ||
|
||
To install this library, there are two options: | ||
|
||
1. Copy everything inside the "include" folder into your project include folder. | ||
Done! | ||
2. Clone this github repository anywhere in your project and in your | ||
"CMakeLists.txt" add a line called `add_subdirectory | ||
(LOCATION_OF_THIS_LIBRARY)`. Then, in `target_link_libraries` add | ||
`RedDigitizer++::RedDigitizer++`. Done! | ||
|
||
# Examples | ||
|
||
There are tests (or examples) inside "test/source/basic_test.cpp" that can be compiled to test the library works. Its original intent is to make sure the code can compile in your computer and actually run with little to no bugs. | ||
|
||
It uses a library called doctest, so it has some code that might look unusual. | ||
|
||
# TODO: | ||
|
||
* Better examples. | ||
* Complete tests. | ||
* Bug hunt, are there bugs? |
Oops, something went wrong.