Skip to content

Commit 20347ae

Browse files
committed
Update docs
1 parent 5499299 commit 20347ae

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

docs/cmake/cmake-code-style.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ On the contrary, variable names are case-sensitive.
9292
a backslash character (`\`) followed by a new line:
9393

9494
```cmake
95-
message("\
95+
message(STATUS "\
9696
This string is concatenated \
9797
to a single line.\
9898
")
99+
100+
# Output: This string is concatenated to a single line.
99101
```
100102

101103
* When defining path variables, exclude the trailing directory delimiter (`/`).

docs/cmake/introduction.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ brackets `{}`.
192192

193193
```cmake
194194
set(foobar "value")
195-
message(STATUS ${foobar})
195+
message(STATUS "${foobar}")
196196
197197
# Output: value
198198
```
@@ -272,13 +272,22 @@ etc.) and passed as-is. No escaping of special characters is needed, but also
272272
variables are not expanded. They are most commonly used for passing strings of
273273
code or regular expressions.
274274

275+
For example
276+
275277
```cmake
276-
message([=[
278+
message(STATUS [=[
277279
Inside bracket arguments the \-escape sequences and ${variable} references are
278280
not evaluated. Argument can also contain ; and other special ]] characters.
279281
]=])
280282
```
281283

284+
will output:
285+
286+
```
287+
Inside bracket arguments the \-escape sequences and ${variable} references are
288+
not evaluated. Argument can also contain ; and other special ]] characters.
289+
```
290+
282291
## 5. Targets
283292

284293
CMake revolves around targets, which represent various components of the

0 commit comments

Comments
 (0)