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:
Reinhold Gschweicher
2020-12-17 14:02:48 +01:00
committed by Martin Hořeňovský
parent 031a57e7b7
commit 48f220b68a
3 changed files with 17 additions and 2 deletions

View File

@@ -9,6 +9,13 @@ either of these is a breaking change, and thus will not happen until
at least the next major release.
### `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