Add comma-escaping in test specs to ParseAndAddCatchTests.cmake

Fixes #1527
This commit is contained in:
Martin Hořeňovský 2019-03-03 13:10:08 +01:00
parent 28db5ed4c9
commit bd667f4d69
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 3 additions and 0 deletions

View File

@ -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