Update README for cmake

This commit is contained in:
Pierre Dejoue 2020-10-24 19:56:43 +02:00
parent c4404a73fb
commit c480777a5b

View File

@ -52,6 +52,8 @@ python waf configure
python waf build python waf build
``` ```
Alternatively, the testbed can be built using cmake. See below.
Running the Examples Running the Examples
-------------------- --------------------
@ -59,7 +61,7 @@ Load data points from a file:
``` ```
p2t <filename> <center_x> <center_y> <zoom> p2t <filename> <center_x> <center_y> <zoom>
``` ```
Random distribution of points inside a consrained box: Random distribution of points inside a constrained box:
``` ```
p2t random <num_points> <box_radius> <zoom> p2t random <num_points> <box_radius> <zoom>
``` ```
@ -71,3 +73,34 @@ Examples:
./build/p2t random 10 100 5.0 ./build/p2t random 10 100 5.0
./build/p2t random 1000 20000 0.025 ./build/p2t random 1000 20000 0.025
``` ```
BUILD WITH CMAKE
================
Build the library
-----------------
```
mkdir build && cd build
cmake -GNinja
cmake --build .
```
Build and run the unit tests
----------------------------
```
mkdir build && cd build
cmake -GNinja -DP2T_BUILD_TESTS=ON
cmake --build .
ctest --output-on-failure
```
Build the testbed
-----------------
```
mkdir build && cd build
cmake -GNinja -DP2T_BUILD_TESTBED=ON
cmake --build .
```