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

use absolute path to test files - accroding to CMake docs EXISTS behavior is well-defined only for full paths.

Commit
a49fa0edbe6d25a5f6b92721beb3f5d2ca10ecc3
Author
dvirtz ·
Parents
d271683c147d

Files · Download .tar.gz

Changes

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

diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake
index a81de4b8..1b96802f 100644
--- a/contrib/ParseAndAddCatchTests.cmake
+++ b/contrib/ParseAndAddCatchTests.cmake
@@ -47,6 +47,8 @@ endfunction()
 
 # Worker function
 function(ParseFile SourceFile TestTarget)
+    # accroding to CMake docs EXISTS behavior is well-defined only for full paths.
+    get_filename_component(SourceFile ${SourceFile} ABSOLUTE)
     if(NOT EXISTS ${SourceFile})
         message(WARNING "Cannot find source file: ${SourceFile}")
         return()