From 682617b5b7c7764ccac720e7a7677ecd12f0d5f1 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Thu, 7 Mar 2019 15:07:57 +0100 Subject: [PATCH] ParseAndAddCatchTests: Fix tests not found When using an optional launcher the target name is not interpreted as a target, therefore it is not replaced automatically with its path. --- contrib/ParseAndAddCatchTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake index c9b838d7..4382e7c4 100644 --- a/contrib/ParseAndAddCatchTests.cmake +++ b/contrib/ParseAndAddCatchTests.cmake @@ -179,7 +179,7 @@ function(ParseFile SourceFile TestTarget) string(REPLACE "," "\\," Name ${Name}) # Add the test and set its properties - add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} ${TestTarget} ${Name} ${AdditionalCatchParameters}) + add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} $ ${Name} ${AdditionalCatchParameters}) # Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead if(PARSE_CATCH_TESTS_NO_HIDDEN_TESTS AND ${HiddenTagFound} AND ${CMAKE_VERSION} VERSION_GREATER "3.8") PrintDebugMessage("Setting DISABLED test property")