From Merriam Webster Online:
ver·ba·tim (adv): in the exact words : word for word.
That’s my first impression of what CMake VERBATIM option should behave, and so do some folks in http://marc.info/?l=cmake&m=122818556004629&w=2. That is, the WHOLE argument list should be passed exactly as it is in CMakeLists.txt, unchanged.
But apparently CMake developers interpret that word in other way. For them, INDIVIUAL arguments should be passed safely though the tough neighberhood. The idea itself sounds good, unfortunately, CMake is not smart enough to do that.
Following example demostrates this problem:
ADD_CUSTOM_TARGET(hello
COMMAND echo "How are you doing?" 'Fine, thank you.'
)
|
generates
CMakeFiles/hello:
echo How\ are\ you\ doing? 'Fine, thank you.'
|
While with VERBATIM,
ADD_CUSTOM_TARGET(hello
COMMAND echo "How are you doing?" 'Fine, thank you.'
VERBATIM
)
|
generates
CMakeFiles/hello:
echo "How are you doing?" "'Fine," thank "you.'"
|
Seems that VERBATIM only reckons and handles double-quoted strings.
If you need single-quoted strings or any others, sorry,
turn off VERBATIM and do it yourself.