最佳答案
Imagine I have the following string :
set(SEXY_STRING "I love CMake")
then I want to obtain SEXY_LIST
from SEXY_STRING
so I can do
list(LENGTH SEXY_LIST len)
and len
is equal 3.
I've found several macros on web, but I really want to know how to do it in "natural" way. This operation seems to be very basic and widely used.