mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 11:25:38 +02:00
Add deprecation warning in ParseAndCatchTests
Parsing C++ with regex in CMake is error prone and regularly leads to silently dropped (not run) test cases. Going forward the function `catch_discover_tests` from `contrib/CMake.cmake` should be used. For more information see https://github.com/catchorg/Catch2/issues/2092#issuecomment-747342765
This commit is contained in:

committed by
Martin Hořeňovský

parent
2375a7f5b7
commit
18ab353e55
@@ -72,6 +72,13 @@ Instead you will have to write this:
|
||||
REQUIRE_THAT(foo(), m1 || m2 || m3);
|
||||
```
|
||||
|
||||
### `ParseAndAddCatchTests.cmake`
|
||||
|
||||
The CMake/CTest integration using `ParseAndAddCatchTests.cmake` is deprecated,
|
||||
as it can be replaced by `Catch.cmake` that provides the function
|
||||
`catch_discover_tests` to get tests directly from a CMake target via the
|
||||
command line interface instead of parsing C++ code with regular expressions.
|
||||
|
||||
|
||||
## Planned changes
|
||||
|
||||
|
Reference in New Issue
Block a user