From a49fa0edbe6d25a5f6b92721beb3f5d2ca10ecc3 Mon Sep 17 00:00:00 2001 From: dvirtz Date: Thu, 18 May 2017 15:51:44 +0300 Subject: [PATCH] use absolute path to test files - accroding to CMake docs EXISTS behavior is well-defined only for full paths. --- 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()