avoiding extra quotes in add_test command

Hi, I’m trying to add CMake support for an existing library that has a suite of tests that are expected to be invoked in the following way:

test001 /ref/opt

where /ref/opt is the project’s own notation for expressing a list of options for the test, i.e. {ref, opt}. In an attempt to set this test up with CMake/CTest, I did

set(BACKENDS /ref/opt)

add_test(
  NAME ${my_test}
  COMMAND ${my_test} ${CEED_BACKENDS}
)				

but that seems to end up invoking

Test command: /path/to/my/project/build/test001 "/ref/opt"

This is not the argument format the program expects, and the tests fail as a result. How do I prevent CMake from appending these extra quotation marks to my test’s arguments?

Is test001 getting the quotes literally in its argv? Also, I see BACKENDS and CEED_BACKENDS; is that a typo here or in the original source?

Sorry, this example was (poorly) anonymized, it should just be BACKENDS in both cases-- I’ll edit to clarify.

Oops, I guess it’s too late to edit now.

You’re right, the quotes are stripped by the time they make it to argv. I (wrongly) assumed the test failure was attributed to the difference in arguments being passed.

Thank you @ben.boeckel