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

summaryrefslogtreecommitdiffhomepage
path: root/extras
diff options
context:
space:
mode:
authorReinhold Gschweicher2020-12-17 14:02:48 +0100
committerMartin Hořeňovský2021-05-09 18:05:25 +0200
commit48f220b68a7ce43846be19ec6db46ede5e5e5ae2 (patch)
treea4d80be7a8efcc3b9de35886286604ad6209a878 /extras
parent031a57e7b719dce26119ac8547f167190234a763 (diff)
downloadcatch3-48f220b68a7ce43846be19ec6db46ede5e5e5ae2.tar.gz
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
Diffstat (limited to 'extras')
-rw-r--r--extras/ParseAndAddCatchTests.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/extras/ParseAndAddCatchTests.cmake b/extras/ParseAndAddCatchTests.cmake
index 4fd1d141..4771e029 100644
--- a/extras/ParseAndAddCatchTests.cmake
+++ b/extras/ParseAndAddCatchTests.cmake
@@ -241,6 +241,7 @@ endfunction()
# entry point
function(ParseAndAddCatchTests TestTarget)
+ message(DEPRECATION "ParseAndAddCatchTest: function deprecated because of possibility of missed test cases. Consider using 'catch_discover_tests' from 'Catch.cmake'")
ParseAndAddCatchTests_PrintDebugMessage("Started parsing ${TestTarget}")
get_target_property(SourceFiles ${TestTarget} SOURCES)
ParseAndAddCatchTests_PrintDebugMessage("Found the following sources: ${SourceFiles}")