Skip to content

Commit

Permalink
fixed inconsistent semicolon expansion in catch_discover_tests (Bug c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Schwab committed Apr 14, 2021
1 parent 42e368d commit de434fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/CatchAddTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ set(tests)

function(add_command NAME)
set(_args "")
foreach(_arg ${ARGN})
# use ARGV* instead of ARGN, because ARGN splits arrays into multiple arguments
math(EXPR _last_arg ${ARGC}-1)
foreach(_n RANGE 1 ${_last_arg})
set(_arg "${ARGV${_n}}")
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument
else()
Expand Down

0 comments on commit de434fa

Please sign in to comment.