Skip to content
Permalink
Browse files

Add comma-escaping in test specs to ParseAndAddCatchTests.cmake

Fixes #1527
  • Loading branch information...
horenmar committed Mar 3, 2019
1 parent 28db5ed commit bd667f4d696fd3f16f93f4584a5fa0b985d6b761
Showing with 3 additions and 0 deletions.
  1. +3 −0 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

0 comments on commit bd667f4

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.