From ad68644304ccb76f07842c61a472919ef303c73b Mon Sep 17 00:00:00 2001 From: Faruk Eryilmaz Date: Mon, 8 Jan 2024 23:59:05 +0300 Subject: [PATCH] update build documentation to reflect optional test suite integration via CMake --- doc/installation_and_test.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/installation_and_test.md b/doc/installation_and_test.md index bcfb16d..5bb7939 100644 --- a/doc/installation_and_test.md +++ b/doc/installation_and_test.md @@ -26,21 +26,22 @@ git clone --recursive https://github.com/farukeryilmaz/bytepack.git ### 3.1 Visual Studio You can generate Visual Studio Solution (.sln) with CMake and run the test on Visual Studio: > Run cmake command under project folder. It generates **BytePack.sln** file under **build** folder. -- **Visual Studio 2022 version 17:** `cmake -S . -B build -G "Visual Studio 17 2022"` -- **Visual Studio 2019 version 16:** `cmake -S . -B build -G "Visual Studio 16 2019"` +- **Visual Studio 2022 version 17:** `cmake -S . -B build -G "Visual Studio 17 2022" -DBYTEPACK_BUILD_TESTS=ON` +- **Visual Studio 2019 version 16:** `cmake -S . -B build -G "Visual Studio 16 2019" -DBYTEPACK_BUILD_TESTS=ON` Or you can directly run test using **CMake** with **MSVC**: ```console -cmake -S . -B build -DCMAKE_CXX_STANDARD=20 +cmake -S . -B build -DCMAKE_CXX_STANDARD=20 -DBYTEPACK_BUILD_TESTS=ON cmake --build build --config Release cd build ctest -C Release ``` - +> To disable building tests, replace `-DBYTEPACK_BUILD_TESTS=ON` with `-DBYTEPACK_BUILD_TESTS=OFF` ### 3.2 GNU/Linux ```bash -cmake -S . -B build +cmake -S . -B build -DBYTEPACK_BUILD_TESTS=ON cmake --build build cd build ctest -``` \ No newline at end of file +``` +> Use `-DBYTEPACK_BUILD_TESTS=OFF` in the cmake command to skip building tests. \ No newline at end of file