File: file.cmake

package info (click to toggle)
gtksourceview4 4.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,840 kB
  • sloc: ansic: 49,715; sh: 4,917; xml: 1,302; makefile: 1,010; python: 230; perl: 52; yacc: 45; cobol: 20; objc: 19; sed: 16; fortran: 14; cpp: 8; ml: 3
file content (39 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download | duplicates (14)
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
33
34
35
36
37
38
39
#[=[
    This is a bracket comment.
    TODO markers are recognized here.
]=]

# This is a line comment.
# TODO markers are recognized here, too.

set(words
    These are unquoted arguments.
    They can include variable references: ${var}, $ENV{var},
    and escape sequences: \n\".)

message("This is an unquoted argument.
    It can also include variable references: ${APPLE}, $ENV{CC},
    and escape sequences: \t\ \\.
    In addition, line continuations: \
    are allowed.")

message("Variable references can nest: ${x$ENV{y${z}w}v}")

message([==[
    This is a bracket argument.
    Variable references (${x}) or escape sequences (\n)
    are not processed here.
]==])

# These are examples of legacy unquoted argument syntax
# from the cmake-language manual page.
set(arg_examples
    -Da="b c" -Da=$(v) a" "b"c"d # legacy
    "-Da=\"b c\"" "-Da=$(v)" "a\" \"b\"c\"d" # quoted equivalents
)
unset(arg_examples)

# Control construct example.
if(a EQUAL 5 AND (s STREQUAL "${x}" OR s MATCHES [[\*]]))
endif()