diff --git a/CMakeLists.txt b/CMakeLists.txt index 6296300..1509a26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # Generate compile_commands.json for clang based tools set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) + # Add the include folder for public headers include_directories(${PROJECT_SOURCE_DIR}/include) diff --git a/README.md b/README.md index 7003559..920c1e9 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,16 @@ A utility library that provides essential tools, helper functions, and implement - Cross-platform C++ library and Python APIs - > **_NOTE:_** Python API is planned but not yet implemented. - - > **_NOTE:_** Windows should be supported but not yet tested, contributions welcome! - Easily integrate dealing with OSI data and trace files into your own projects - More OSI utility features planned, feature requests and pull requests welcome! ## Build Instructions -### Install required dependencies +### Install required dependencies on Linux - Compiler (e.g. GCC, Clang, MSVC) - [CMake](https://cmake.org/download/) +- [Doxygen](https://www.doxygen.nl/download.html) - [zstd](https://github.com/facebook/zstd) - [lz4](https://github.com/lz4/lz4) - [Protobuf](https://github.com/protocolbuffers/protobuf) @@ -30,6 +30,39 @@ A utility library that provides essential tools, helper functions, and implement sudo apt install build-essential cmake libzstd-dev liblz4-dev protobuf-compiler doxygen ``` +### Install required dependencies on Windows + +- Compiler (e.g. [MS Build Tools for Visual Studio 2022](https://visualstudio.microsoft.com/de/downloads/#build-tools-for-visual-studio-2022)) +- [CMake](https://cmake.org/download/) +- [Doxygen](https://www.doxygen.nl/download.html) +- [zstd](https://github.com/facebook/zstd) +- [lz4](https://github.com/lz4/lz4) +- [Protobuf](https://github.com/protocolbuffers/protobuf) +- [pkg-config](https://stackoverflow.com/a/25605631/2883130) +- [gtest](https://google.github.io/googletest/) + +> **_NOTE:_** Use the protobuf installation instructions for Windows from [OSI](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/interface/setup/installing_prerequisites.html#_windows) to create the triplets file. You can use [vcpkg](https://github.com/microsoft/vcpkg) and [chocolatey](https://chocolatey.org/) to install the following dependencies: + + ```bash + > choco install git + > choco install cmake + > choco install pkgconfiglite + > + > vcpkg install --triplet=x64-windows-static-md protobuf + > vcpkg install lz4 + > vcpkg install zstd + > vcpkg install gtest + > vcpkg install pthreads + ``` + +### Environment variables + +Make sure that the `/bin` folders of the depedencies are added to your `$PATH`. In addition set the following variables: + +```bash +CMAKE_PREFIX_PATH=C:/path/to/vcpkg/installed/x64-windows +``` + ### Build Clone the repository incl. submodules @@ -38,16 +71,11 @@ Clone the repository incl. submodules git clone --recurse-submodules https://github.com/Lichtblick-Suite/asam-osi-utilities.git ``` -Create build directory and configure using CMake +Create build directory and configure using CMake and build afterwards: ```bash mkdir build && cd build cmake .. -``` - -Build using CMake - -```bash cmake --build . -j4 ``` diff --git a/include/osi-utilities/tracefile/Writer.h b/include/osi-utilities/tracefile/Writer.h index 2d53146..e9453f2 100644 --- a/include/osi-utilities/tracefile/Writer.h +++ b/include/osi-utilities/tracefile/Writer.h @@ -17,7 +17,7 @@ namespace osi3 { * This class provides an interface for writing protobuf messages to trace files. * Different implementations can support various file formats like .osi, .mcap or .txth. * - * @Note The WriteMessage() function is intentionally omitted from this base class since it is format-specific. + * @note The WriteMessage() function is intentionally omitted from this base class since it is format-specific. * Users should dynamically cast to the concrete implementation class to access the appropriate WriteMessage() function. */ class TraceFileWriter {