diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 15:04:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-22 15:04:19 (GMT) |
commit | 6abe14d2263476755364ef5017cc6b25b42a9ed5 (patch) | |
tree | 66189aa62b69d47ce196692dfa82b1f5ff8b7c25 /Tests | |
parent | 504aadf414d6c53c9eeb0c74b1a4b5438e0e5c3d (diff) | |
parent | 920d18004731c97a828a937e2074b6882ffeb20d (diff) | |
download | CMake-6abe14d2263476755364ef5017cc6b25b42a9ed5.zip CMake-6abe14d2263476755364ef5017cc6b25b42a9ed5.tar.gz CMake-6abe14d2263476755364ef5017cc6b25b42a9ed5.tar.bz2 |
Merge topic 'cmake-presets-boolean-cache'
920d180047 CMakePresets.json: Allow boolean for cache variable value
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5398
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakePresets/CMakePresets.json.in | 16 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/Good-stdout.txt | 6 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/Good.cmake | 6 |
3 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresets/CMakePresets.json.in b/Tests/RunCMake/CMakePresets/CMakePresets.json.in index 8bfc602..18b9c3a 100644 --- a/Tests/RunCMake/CMakePresets/CMakePresets.json.in +++ b/Tests/RunCMake/CMakePresets/CMakePresets.json.in @@ -46,6 +46,22 @@ "type": "BOOL", "value": "OFF" }, + "TEST_BOOL_TRUE": true, + "TEST_BOOL_FALSE": false, + "TEST_TYPED_BOOL_TRUE": { + "type": "STRING", + "value": true + }, + "TEST_TYPED_BOOL_FALSE": { + "type": "STRING", + "value": false + }, + "TEST_UNTYPED_BOOL_TRUE": { + "value": true + }, + "TEST_UNTYPED_BOOL_FALSE": { + "value": false + }, "TEST_PRESET_NAME": { "type": "STRING", "value": "x${presetName}x" diff --git a/Tests/RunCMake/CMakePresets/Good-stdout.txt b/Tests/RunCMake/CMakePresets/Good-stdout.txt index ce6189e..7adf1ca 100644 --- a/Tests/RunCMake/CMakePresets/Good-stdout.txt +++ b/Tests/RunCMake/CMakePresets/Good-stdout.txt @@ -1,5 +1,7 @@ Preset CMake variables: + TEST_BOOL_FALSE:BOOL="FALSE" + TEST_BOOL_TRUE:BOOL="TRUE" TEST_DOLLAR="\$" TEST_D_ENV_REF="xEnvironment variablex" TEST_D_ENV_REF_P="" @@ -32,6 +34,10 @@ Preset CMake variables: TEST_TRAILING_DOLLAR="a \$" TEST_TRAILING_UNKNOWN_NAMESPACE="\$unknown{namespace" TEST_TRUE:BOOL="TRUE" + TEST_TYPED_BOOL_FALSE:STRING="FALSE" + TEST_TYPED_BOOL_TRUE:STRING="TRUE" + TEST_UNTYPED_BOOL_FALSE="FALSE" + TEST_UNTYPED_BOOL_TRUE="TRUE" Preset environment variables: diff --git a/Tests/RunCMake/CMakePresets/Good.cmake b/Tests/RunCMake/CMakePresets/Good.cmake index d8e3e2d..55b85da 100644 --- a/Tests/RunCMake/CMakePresets/Good.cmake +++ b/Tests/RunCMake/CMakePresets/Good.cmake @@ -8,6 +8,12 @@ test_variable(TEST_SOURCE_PARENT_DIR "PATH" "${_parent_dir}") test_variable(TEST_SOURCE_LIST "FILEPATH" "${CMAKE_SOURCE_DIR}/CMakeLists.txt") test_variable(TEST_TRUE "BOOL" "TRUE") test_variable(TEST_OFF "BOOL" "OFF") +test_variable(TEST_BOOL_TRUE "BOOL" "TRUE") +test_variable(TEST_BOOL_FALSE "BOOL" "FALSE") +test_variable(TEST_TYPED_BOOL_TRUE "STRING" "TRUE") +test_variable(TEST_TYPED_BOOL_FALSE "STRING" "FALSE") +test_variable(TEST_UNTYPED_BOOL_TRUE "UNINITIALIZED" "TRUE") +test_variable(TEST_UNTYPED_BOOL_FALSE "UNINITIALIZED" "FALSE") test_variable(TEST_PRESET_NAME "STRING" "xGoodx") test_variable(TEST_GENERATOR "UNINITIALIZED" "x${CMAKE_GENERATOR}x") test_variable(TEST_DOLLAR "UNINITIALIZED" "$") |