Quote variable dereference properly

This commit is contained in:
Uy Ha 2023-11-15 08:44:26 +00:00
parent 41ecdb6f55
commit 3cf405b60d

View File

@ -132,7 +132,7 @@ function(catch_discover_tests_impl)
endforeach(char) endforeach(char)
# ...add output dir # ...add output dir
if(output_dir) if(output_dir)
string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean ${test_name}) string(REGEX REPLACE "[^A-Za-z0-9_]" "_" test_name_clean "${test_name}")
set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}") set(output_dir_arg "--out ${output_dir}/${output_prefix}${test_name_clean}${output_suffix}")
endif() endif()
@ -157,8 +157,7 @@ function(catch_discover_tests_impl)
add_command(set_tests_properties add_command(set_tests_properties
"${prefix}${test}${suffix}" "${prefix}${test}${suffix}"
PROPERTIES PROPERTIES
ENVIRONMENT_MODIFICATION "${environment_modifications}" ENVIRONMENT_MODIFICATION "${environment_modifications}")
)
endif() endif()
list(APPEND tests "${prefix}${test}${suffix}") list(APPEND tests "${prefix}${test}${suffix}")