Skip to content

Commit c0b98b3

Browse files
committed
Add documentation for the [variables] section
1 parent 2c6fc56 commit c0b98b3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/cmake-toml.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ nav_order: 3
99

1010
This page is a reference for the options in the `cmake.toml` file. If you think anything is missing or unclear, please [edit this page](https://github.com/build-cpp/cmkr/edit/main/docs/cmake-toml.md) or open an [issue](https://github.com/build-cpp/cmkr/issues).
1111

12-
See the [examples](/examples) section for concrete examples.
12+
This is a reference page. Check out the [examples](/examples) and the [cmkr topic](https://github.com/topics/cmkr) as well.
13+
{:.info}
1314

1415
## CMake configuration
1516

@@ -93,6 +94,16 @@ include-before = ["cmake/before-subdir.cmake"]
9394
include-after = ["cmake/after-subdir.cmake"]
9495
```
9596

97+
## Variables
98+
99+
```toml
100+
[variables]
101+
MYBOOL = true
102+
MYSTRING = "hello"
103+
```
104+
105+
Variables emit a [`set`](https://cmake.org/cmake/help/latest/command/set.html) and can be used to configure subprojects and packages.
106+
96107
## Vcpkg
97108

98109
```toml

0 commit comments

Comments
 (0)