I create a list of arguments to pass to the COMMAND of add_custom_target
list(APPEND MyOdbArgs "--default-pointer")
list(APPEND MyOdbArgs "*")
the makefile generated contains snippet like
cd /home/.../<proj>-build-release-sqlite/odb && odb -d sqlite --std c++17 --profile boost --default-pointer * --other options
odb is then invoked but the shell does expand the star and messes the up odb invocation.
I then tried
list(APPEND MyOdbArgs "--default-pointer")
list(APPEND MyOdbArgs "\*")
with the same result
FInally I tried
list(APPEND MyOdbArgs "--default-pointer")
list(APPEND MyOdbArgs "\\*")
the invocation then is
cd /home/.../<proj>-build-release-sqlite/odb && odb -d sqlite --std c++17 --profile boost --default-pointer \* --other options
and odb gets given actually ‘\*’ as a arg which it doesn’t accept.
all 3 times, VERBATIM is used.
When I copied the odb invocation from the build.make file generated by cmake and pasted manually, the backslash start mechanism works for odb.
Any ideas how get the character * to reach odb as is?