I have a user command in CMakeLists.txt:
set(testfiles "test1 test2") add_custom_target(testtouch COMMAND touch ${testfiles})
When I run "make testtouch VERBOSE = 1", I see that it does:
touch test1\ test2
This is just an example, but I have this problem in a real project, and "\" violate the command. Note that I get the variable (here testfiles) from the Find script and cannot just get rid of the double quotes.
Why does CMake do this?
How to avoid this?
Barth source share