From 4ba2e36462e35c77765c911a982233ccc6a6358e Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Tue, 26 Oct 2021 17:05:27 +0200 Subject: [PATCH 1/2] Update README.md Change `Quickstart` section to match new default value for testing. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6c7ee223..19a1e0f3 100644 --- a/README.md +++ b/README.md @@ -198,16 +198,16 @@ Please check the [CMake build instructions](cmake/README.md). - build `list_cpu_features` ``` - cmake -B/tmp/cpu_features -H. -GNinja -DCMAKE_BUILD_TYPE=Release - ninja -C/tmp/cpu_features - /tmp/cpu_features/list_cpu_features --json +cmake -B/tmp/cpu_features -H. -GNinja -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release +ninja -C/tmp/cpu_features +/tmp/cpu_features/list_cpu_features --json ``` - run tests ``` - cmake -B/tmp/cpu_features -H. -GNinja -DBUILD_TESTING=ON - ninja -C/tmp/cpu_features - ninja -C/tmp/cpu_features test +cmake -B/tmp/cpu_features -H. -GNinja +ninja -C/tmp/cpu_features +ninja -C/tmp/cpu_features test ``` From 995768c148ae4087f816ea9ea4d87cf28371aead Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Wed, 27 Oct 2021 11:56:31 +0000 Subject: [PATCH 2/2] Address comments --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 19a1e0f3..48f9caad 100644 --- a/README.md +++ b/README.md @@ -194,21 +194,25 @@ See [LICENSE](LICENSE) for more information. Please check the [CMake build instructions](cmake/README.md). -### Quickstart with `Ninja` +### Quickstart - - build `list_cpu_features` -``` -cmake -B/tmp/cpu_features -H. -GNinja -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -ninja -C/tmp/cpu_features -/tmp/cpu_features/list_cpu_features --json + - Run `list_cpu_features` +```sh +cmake -S. -Bbuild -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release +cmake --build build --config Release -j +./build/list_cpu_features --json ``` +_Note_: Use `--target ALL_BUILD` on the second line for `Visual Studio` and `XCode`. + - run tests +```sh +cmake -S. -Bbuild -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug +cmake --build build --config Debug -j +cmake --build build --config Debug --target test ``` -cmake -B/tmp/cpu_features -H. -GNinja -ninja -C/tmp/cpu_features -ninja -C/tmp/cpu_features test -``` + +_Note_: Use `--target RUN_TESTS` on the last line for `Visual Studio` and `--target RUN_TEST` for `XCode`. ## Community bindings