From c480777a5b1c05faa4a0ccf0cc8b90c9389ff8c0 Mon Sep 17 00:00:00 2001 From: Pierre Dejoue Date: Sat, 24 Oct 2020 19:56:43 +0200 Subject: [PATCH] Update README for cmake --- README.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1379dcd..9e92eb0 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ python waf configure python waf build ``` +Alternatively, the testbed can be built using cmake. See below. + Running the Examples -------------------- @@ -59,7 +61,7 @@ Load data points from a file: ``` p2t ``` -Random distribution of points inside a consrained box: +Random distribution of points inside a constrained box: ``` p2t random ``` @@ -71,3 +73,34 @@ Examples: ./build/p2t random 10 100 5.0 ./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 . +```