From bd667f4d696fd3f16f93f4584a5fa0b985d6b761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 3 Mar 2019 13:10:08 +0100 Subject: [PATCH] Add comma-escaping in test specs to ParseAndAddCatchTests.cmake Fixes #1527 --- contrib/ParseAndAddCatchTests.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake index e28dc226..ff4fc667 100644 --- a/contrib/ParseAndAddCatchTests.cmake +++ b/contrib/ParseAndAddCatchTests.cmake @@ -172,6 +172,9 @@ function(ParseFile SourceFile TestTarget) PrintDebugMessage("Setting labels to ${Labels}") endif() + # Escape commas in the test spec + string(REPLACE "," "\\," Name ${Name}) + # Add the test and set its properties add_test(NAME "\"${CTestName}\"" COMMAND ${OptionalCatchTestLauncher} ${TestTarget} ${Name} ${AdditionalCatchParameters}) # Old CMake versions do not document VERSION_GREATER_EQUAL, so we use VERSION_GREATER with 3.8 instead