From f6fb9d02fa37ff39ca6b22a5ebb158ac35a4f6fe Mon Sep 17 00:00:00 2001 From: Siddharth Chandrasekaran Date: Sat, 3 Aug 2024 21:44:22 +0200 Subject: [PATCH] doc: Update cmake invocations for cross-platform builds Signed-off-by: Siddharth Chandrasekaran --- README.md | 8 +++---- doc/libosdp/build-and-install.rst | 33 +++++++++++++++++---------- scripts/{run_test.sh => run_tests.sh} | 0 3 files changed, 24 insertions(+), 17 deletions(-) rename scripts/{run_test.sh => run_tests.sh} (100%) mode change 100755 => 100644 diff --git a/README.md b/README.md index 203aa51..ed867b0 100644 --- a/README.md +++ b/README.md @@ -137,14 +137,12 @@ that are exposed by libosdp. ```sh git clone https://github.com/goToMain/libosdp --recurse-submodules -# git submodule update --init (if you missed doing --recurse-submodules earlier) cd libosdp -mkdir build && cd build -cmake .. -make +cmake -B build . +cmake --build build --parallel ``` -Refer to [this document][23] for more information on build and cross +Refer to the [documentation][23] for more information on build and cross compilation. ### Run the test suite diff --git a/doc/libosdp/build-and-install.rst b/doc/libosdp/build-and-install.rst index 7e8af70..71631a5 100644 --- a/doc/libosdp/build-and-install.rst +++ b/doc/libosdp/build-and-install.rst @@ -15,13 +15,14 @@ Cmake is the recommented way for building libosdp. .. code:: sh - mkdir build && cd build - cmake .. - make + cmake -B build + cmake --build build --parallel + +Optionally, you could install libosdp using, + +.. code:: sh - # (optional) - make check - make DESTDIR=/your/install/path install + cmake --build build --target install Make Build ---------- @@ -35,9 +36,6 @@ own Makefile to be chained in some other build system. Please see `configure.sh ./configure.sh make - # (optional) - make check - Build html docs --------------- @@ -46,9 +44,20 @@ HTML docs of LibOSDP depends on python3, pip3, doxygen, sphinx, and breathe. .. code:: sh pip3 install -r doc/requirements.txt - mkdir build && cd build - cmake .. - make html_docs + cmake -B build + cmake --build build --target html_docs --parallel + + +Running the test suite +---------------------- + +If you are adding features to LibOSDP, you might want to kick off the test +suite to ensure that you changes are valid and has not regressed any other +features. To do this run, + +.. code:: sh + + ./scripts/run_tests.sh Compile-time configuration options ---------------------------------- diff --git a/scripts/run_test.sh b/scripts/run_tests.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/run_test.sh rename to scripts/run_tests.sh