... | ... | @@ -16,11 +16,15 @@ For using `PeTrack` following tools and libraries are needed: |
|
|
- CMake (>= 3.16)
|
|
|
- Qt (>= 5.14)
|
|
|
- OpenCV (== 4.5)
|
|
|
- Qwt (>= 6.1)
|
|
|
- Qwt (>= 6.2)
|
|
|
|
|
|
When developing `PeTrack` and using the test framework following additional tools and libraries are needed:
|
|
|
When developing `PeTrack` and using the test framework following additional tools and libraries are used, they are provided as submodules by `PeTrack`:
|
|
|
- Catch2
|
|
|
- trompeloeil
|
|
|
- spdlog
|
|
|
- ezc3d
|
|
|
|
|
|
Some additional tools need to be installed by yourself, as:
|
|
|
- Python (>= 3.6)
|
|
|
- pytest
|
|
|
|
... | ... | @@ -36,10 +40,10 @@ In this tutorial we will assume that we start at `/home/dev/`. The following not |
|
|
[<current_directory>] $ <command>
|
|
|
```
|
|
|
|
|
|
First thing you need to do is clone the repository to get the source code. This can be done in any directory. Be aware that a new directory with the name `petrack` will be created.
|
|
|
First thing you need to do is clone the repository to get the source code. This can be done in any directory. Be aware that a new directory with the name `petrack` will be created.The `--recursive` will load all the submodules for external dependencies. If you get an error/warning for the `3rdparty` submodule, you can still continue as it contains some internal libs.
|
|
|
|
|
|
```
|
|
|
[/home/dev] $ git clone https://jugit.fz-juelich.de/ped-dyn-emp/petrack.git
|
|
|
[/home/dev] $ git clone https://jugit.fz-juelich.de/ped-dyn-emp/petrack.git --recursive
|
|
|
```
|
|
|
|
|
|
### How to build (User)
|
... | ... | @@ -58,18 +62,21 @@ Next you need to create a build directory in which CMake will create all the fil |
|
|
[/home/dev/petrack/build] $
|
|
|
```
|
|
|
|
|
|
Now you can start to build `PeTrack`.
|
|
|
Now you can start to build `PeTrack`:
|
|
|
|
|
|
```
|
|
|
[/home/dev/petrack/build] $ cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
[/home/dev/petrack/build] $ cmake --build .
|
|
|
```
|
|
|
|
|
|
Afterwards `PeTrack` can be executed with:
|
|
|
|
|
|
```
|
|
|
[/home/dev/petrack/build] $ ./petrack
|
|
|
```
|
|
|
|
|
|
When you add your building directory to your path (here `/home/dev/petrack/build`). You can call `PeTrack` from anywhere with
|
|
|
|
|
|
```
|
|
|
[/home/dev/some/where/else] $ petrack
|
|
|
```
|
... | ... | @@ -78,11 +85,13 @@ Please check the documentation of your operating system how to do this. |
|
|
|
|
|
|
|
|
### How to build (Developer)
|
|
|
|
|
|
When you want to start developing on `PeTrack` following might also be helpful, it will help you to setup also the test suite and give some more compile options for debugging proposes.
|
|
|
|
|
|
We start right after the users compiled their version of `PeTrack`, hence the repository is already cloned to `/home/dev/petrack/` and a build directory `/home/dev/petrack/build` has been created.
|
|
|
|
|
|
To run the tests you first need to download the test data, which is stored in the git large file system. To do so you first need to download everything:
|
|
|
|
|
|
```
|
|
|
[/home/dev/petrack] $ git lfs install --skip-smudge
|
|
|
[/home/dev/petrack] $ git lfs pull
|
... | ... | @@ -105,6 +114,7 @@ Afterwards the debuggable executable can be called with: |
|
|
```
|
|
|
|
|
|
To run the unit tests just execute, this will just take a couple of seconds:
|
|
|
|
|
|
```
|
|
|
[/home/dev/petrack/build-debug] $ ./tests/unit_test/petrack_tests
|
|
|
```
|
... | ... | @@ -117,22 +127,30 @@ To run the regression tests, you need to switch to the regression test directory |
|
|
```
|
|
|
|
|
|
### CMake configuration flags
|
|
|
|
|
|
Following CMake options might be helpful for you when compiling, see [CMake Documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html) for more details. Some of higher interest are explained here:
|
|
|
- `-G` sets the generator, which is used to compile the source code later. Default on linux/MacOS are `Makefiles` and on Windows `Visual Studio XX YEAR` depending on the installed MSVS version. Also other generators as `Ninja` can be used. Usage:
|
|
|
|
|
|
```
|
|
|
$ cmake -G Ninja <path_to_cmakelist>
|
|
|
```
|
|
|
|
|
|
- `-DCMAKE_BUILD_TYPE=` sets the build type. Typical options are `Release` for faster and better optimized builds. And `Debug` for slower debugging builds. Usage:
|
|
|
|
|
|
```
|
|
|
$ cmake -DCMAKE_BUILD_TYPE=Debug <path_to_cmakelist>
|
|
|
```
|
|
|
|
|
|
- `-DCMAKE_PREFIX_PATH=[paths where additionally to search for libraries etc]` adds directories where CMake will search for libraries, useful if you do not want to install a library to the `PATH`.
|
|
|
|
|
|
- `-DCMAKE_CXX_COMPILER=` sets the C++ compilers used when building the project. Usage:
|
|
|
|
|
|
```
|
|
|
$ cmake -DCMAKE_CXX_COMPILER=clang++ <path_to_cmakelist>
|
|
|
```
|
|
|
|
|
|
We extended the options with our own, which allow better configuration of the projects:
|
|
|
|
|
|
- `-DBUILD_UNIT_TESTS=` can be set to `ON` or `OFF`. Defines with the unit tests are build. Default if `ON`
|
|
|
|
|
|
### Known issues
|
... | ... | |