Skip to content
Snippets Groups Projects

Better Error Handling and Logging

Merged Timm Fitschen requested to merge dev into main
+ 37
1
# How to Develop and Use Libcaosdb
## Dependencies
* See [DEPENDENCIES.md](Dependencies.md)
## Build
We use [cmake](https://cmake.org) as build tool.
1. `mkdir build && cd build/`
0. clone/update the subrepo `git submodule update --init proto`
1. `mkdir build && cd build`
2. `conan install .. -s "compiler.libcxx=libstdc++11"`
3. `cmake -B . ..`
4. `cmake --build .`
@@ -29,6 +34,37 @@ have to add `build/lib/` (or, alternatively after installation,
`CMAKE_INSTALL_PREFIX/lib`) to your `DYLD_LIBRARY_PATH` environmental
variable.
### How to build on Windows
We use [Visual Studio 2019](https://visualstudio.microsoft.com/de/vs/features/cplusplus/)
as compiler. We use [cmake](https://cmake.org/download/) as build tool.
0. clone/update the subrepo `git submodule update --init proto`
1. `mkdir build`
2. `cd build`
3. `conan install .. -g visual_studio -s arch=x86_64 -s build_type=Release -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MD --build=missing --update`
4. `cmake -B . ..`
5. open ` libcaosdb.sln` with Visual Studio, change the buildtype to `Release`
and build the project. (You can open Tools/Command Line/Developer Command
Prompt and execute `msbuild libcaosdb.sln /property:Configuration=Release`)
### Creating a Local Conan Build ##
Building and installing libcaosdb with Conan is just a single command:
`conan create . -s "compiler.libcxx=libstdc++11"`
For MacOS, you probably should adjust the option as mentioned above.
### Troubleshooting
#### `conan install` Fails Due to Missing Prebuilts
When `conan install` fails during the installation of the dependencies because
a precompiled package is not available for your specific settings, try adding
the `--build=missing` option: `conan install .. [ other options
] --build=missing`. This should download and compile the sources of the
dependencies.
## Unit Tests
### Build
Loading