From c0b98b3ef455ca6a5f77c8a83c5afeaac360706f Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Sat, 14 Jan 2023 18:12:57 +0100 Subject: [PATCH] Add documentation for the [variables] section --- docs/cmake-toml.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/cmake-toml.md b/docs/cmake-toml.md index 3fe0f0b..16a7a86 100644 --- a/docs/cmake-toml.md +++ b/docs/cmake-toml.md @@ -9,7 +9,8 @@ nav_order: 3 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). -See the [examples](/examples) section for concrete examples. +This is a reference page. Check out the [examples](/examples) and the [cmkr topic](https://github.com/topics/cmkr) as well. +{:.info} ## CMake configuration @@ -93,6 +94,16 @@ include-before = ["cmake/before-subdir.cmake"] include-after = ["cmake/after-subdir.cmake"] ``` +## Variables + +```toml +[variables] +MYBOOL = true +MYSTRING = "hello" +``` + +Variables emit a [`set`](https://cmake.org/cmake/help/latest/command/set.html) and can be used to configure subprojects and packages. + ## Vcpkg ```toml