# P³LS³ **P**redictable **P**arallel **P**atterns **L**ibrary for **S**calable **S**mart **S**ystems ## Project Structure The project uses [CMAKE](https://cmake.org/) as it's build system, the recommended IDE is either a simple text editor or [CLion](https://www.jetbrains.com/clion/). We divide the project into subtargets to separate for the library itself, testing and example code. The library itself can be found in `lib/pls`, testing related code is in `test`, example and playground apps are in `app`. ### Buiding To build the project first create a folder for the build (typically as a subfolder to the project) using `mkdir cmake-build-debug`. Change to the new folder `cd cmake-build-debug` and init the cmake project using `cmake ../ -DCMAKE_BUILD_TYPE=DEBUG`. For realease builds do the same only with build type `RELEASE`. Other build time settings can also be passed at this setup step. After this is done you can use normal `make` commands like `make` to build everything `make ` to build a target or `make install` to install the library globally. ### Testing Testing is done using [Catch2](https://github.com/catchorg/Catch2/) in the test subfolder. Tests are build into a target called `tests` and can be executed simply by building this executabe and running it. ### Data Race Detection As this project contains a lot concurrent code we use [Thread Sanitizer](https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual) in our CI process and optional in other builds. To setup CMake builds with sanitizer enabled add the cmake option `-DTHREAD_SANITIZER=ON`. Please regularly test with thread sanitizer enabled and make sure to not keep the repository in a state where the sanitizer reports errors. Consider reading [the section on common data races](https://github.com/google/sanitizers/wiki/ThreadSanitizerPopularDataRaces) to get an idea of what we try to avoid in our code.