1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#[[This is a bracket comment.
It runs until the close bracket.]]
message("First Argument\n" #[[Bracket Comment]] "Second Argument")
#[==[This is a bracket comment.
[[
It runs until the close bracket.
]]
]=]
]===]
]==]
message(FOO)
# This is a line comment.
message("First Argument\n" # This is a line comment :)
"Second Argument") # This is a line comment.
message([=[
This is the first line in a bracket argument with bracket length 1.
No \-escape sequences or ${outer_${inner_variable}_variable} references are evaluated.
This is always one argument even though it contains a ; character.
The text does not end on a closing bracket of length 0 like ]].
It does end in a closing bracket of length 1.
]=])
message("abc${outer_${inner_variable}_variable}def")
if (FOO)
endif(FOO)
list(APPEND CFLAGS -foo=\"${CMAKE_CURRENT_SOURCE_DIR}/bar\")
message("everything else is counted as part of the string")
|