diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-14 19:11:40 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-19 14:25:57 (GMT) |
commit | 2208db114c97f6cd88306507ca917008b8e37d47 (patch) | |
tree | 1bcb00f72d12bd27431a3063527f7fa3df1ba7c4 | |
parent | d30f85193f94d5e9e2a0d0d5f7fc161b79bfee3b (diff) | |
download | CMake-2208db114c97f6cd88306507ca917008b8e37d47.zip CMake-2208db114c97f6cd88306507ca917008b8e37d47.tar.gz CMake-2208db114c97f6cd88306507ca917008b8e37d47.tar.bz2 |
Help: Show multiple ways of doing cacheVariables
This demonstrates both the simple string and the complex object,
and ensures that they get automated testing.
-rw-r--r-- | Help/manual/presets/example.json | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/DocumentationExample.cmake | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Help/manual/presets/example.json b/Help/manual/presets/example.json index c68fa22..6948628 100644 --- a/Help/manual/presets/example.json +++ b/Help/manual/presets/example.json @@ -13,10 +13,11 @@ "generator": "Ninja", "binaryDir": "${sourceDir}/build/default", "cacheVariables": { - "MY_CACHE_VARIABLE": { + "FIRST_CACHE_VARIABLE": { "type": "BOOL", "value": "OFF" - } + }, + "SECOND_CACHE_VARIABLE": "ON" }, "vendor": { "example.com/ExampleIDE/1.0": { diff --git a/Tests/RunCMake/CMakePresets/DocumentationExample.cmake b/Tests/RunCMake/CMakePresets/DocumentationExample.cmake index 1f2fc00..23886f0 100644 --- a/Tests/RunCMake/CMakePresets/DocumentationExample.cmake +++ b/Tests/RunCMake/CMakePresets/DocumentationExample.cmake @@ -1,3 +1,4 @@ include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake) -test_variable(MY_CACHE_VARIABLE "BOOL" "OFF") +test_variable(FIRST_CACHE_VARIABLE "BOOL" "OFF") +test_variable(SECOND_CACHE_VARIABLE "UNINITIALIZED" "ON") |