From 2208db114c97f6cd88306507ca917008b8e37d47 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 14 Oct 2020 15:11:40 -0400 Subject: Help: Show multiple ways of doing cacheVariables This demonstrates both the simple string and the complex object, and ensures that they get automated testing. --- Help/manual/presets/example.json | 5 +++-- 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") -- cgit v0.12