Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2025-01-03 10:30:47 +0100
committerMartin Hořeňovský2025-01-05 20:02:00 +0100
commit7d7b2f89f24cbd277f6eb6912705e5e13c68a3c7 (patch)
treede5bfb1374a86468196ac71b48ca74651782d0ab /docs
parentb0d0aa43e6785f01e2dc4708c23fd8903de26c5c (diff)
downloadcatch3-7d7b2f89f24cbd277f6eb6912705e5e13c68a3c7.tar.gz
Support adding test tags as CTest labels in catch_discover_tests
We also bump the minimum CMake version to 3.20 as per #2943
Diffstat (limited to 'docs')
-rw-r--r--docs/cmake-integration.md18
1 files changed, 14 insertions, 4 deletions
diff --git a/docs/cmake-integration.md b/docs/cmake-integration.md
index ad6ca004..daeb5f75 100644
--- a/docs/cmake-integration.md
+++ b/docs/cmake-integration.md
@@ -81,12 +81,11 @@ to your CMake module path.
`Catch.cmake` provides function `catch_discover_tests` to get tests from
a target. This function works by running the resulting executable with
-`--list-test-names-only` flag, and then parsing the output to find all
-existing tests.
+`--list-test` flag, and then parsing the output to find all existing tests.
#### Usage
```cmake
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.20)
project(baz LANGUAGES CXX VERSION 0.0.1)
@@ -128,6 +127,8 @@ catch_discover_tests(target
[OUTPUT_PREFIX prefix]
[OUTPUT_SUFFIX suffix]
[DISCOVERY_MODE <POST_BUILD|PRE_TEST>]
+ [SKIP_IS_FAILURE]
+ [ADD_TAGS_AS_LABELS]
)
```
@@ -211,6 +212,15 @@ execution (useful e.g. in cross-compilation environments).
calling ``catch_discover_tests``. This provides a mechanism for globally
selecting a preferred test discovery behavior.
+* `SKIP_IS_FAILURE`
+
+Skipped tests will be marked as failed instead.
+
+* `ADD_TAGS_AS_LABELS`
+
+Add the tags from tests as labels to CTest.
+
+
### `ParseAndAddCatchTests.cmake`
⚠ This script is [deprecated](https://github.com/catchorg/Catch2/pull/2120)
@@ -229,7 +239,7 @@ parsed are *silently ignored*.
#### Usage
```cmake
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.20)
project(baz LANGUAGES CXX VERSION 0.0.1)