Content #
The only data type recognized by CMake is a string.
Bracket argements #
Used to pass multiline strings, verbatim.
message([[[[multiline
bracket
argument
]]]])
message([==[
because we used two equal-signs "=="
following is still a single argument:
{ "petsArray" = [["mouse","cat"],["dog"]] }
]==])
使用"[==[“这种形式是因为参数中有double brackets。
Quoted arguments #
Will expand escaped sequences and variable references.
message("1. escape sequence: \" \n in a quoted argument")
message("2. multi...
line")
message("3. and a variable reference: ${CMAKE_VERSION}")
Unquoted arguments #
Both escape sequences and variable references, but semicolons(;) will be treated as delimiter.
a single argument
argum\ ent\;1
three arguments
arg;ume nts