Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added warning if source file cannot be found

If source files are defined using relative paths, CMake will compile the tests, but this script will (sometimes) fail to find and parse the tests from the source files.  I have added an explicit warning when ParseAndAddCatchTests fails to find a source file.
Commit
6f012f2d1d7cc3e467ba41916acd0efc570a2ebd
Author
Benjamin R. Jack ·
Committer
Martin Hořeňovský
Parents
98e61c31dfee

Files · Download .tar.gz

Changes

 contrib/ParseAndAddCatchTests.cmake | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake
index 7fcf7169..a81de4b8 100644
--- a/contrib/ParseAndAddCatchTests.cmake
+++ b/contrib/ParseAndAddCatchTests.cmake
@@ -48,6 +48,7 @@ endfunction()
 # Worker function
 function(ParseFile SourceFile TestTarget)
     if(NOT EXISTS ${SourceFile})
+        message(WARNING "Cannot find source file: ${SourceFile}")
         return()
     endif()
     file(STRINGS ${SourceFile} Contents NEWLINE_CONSUME)
@@ -111,4 +112,4 @@ function(ParseAndAddCatchTests TestTarget)
     foreach(SourceFile ${SourceFiles})
         ParseFile(${SourceFile} ${TestTarget})
     endforeach()
-endfunction()
\ No newline at end of file
+endfunction()