summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-03-10 19:59:14 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-22 19:04:54 (GMT)
commit8bc5c8961e552a15091b7f4d2c205ce90b8f764f (patch)
treeac9fe9a92c01accd1fee2c4914347369546f85ff /Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
parentce6ea7c927b9f80f219a7783ce725bea4c24091f (diff)
downloadCMake-8bc5c8961e552a15091b7f4d2c205ce90b8f764f.zip
CMake-8bc5c8961e552a15091b7f4d2c205ce90b8f764f.tar.gz
CMake-8bc5c8961e552a15091b7f4d2c205ce90b8f764f.tar.bz2
CMakePresets.json: Add the ability to conditionally disable presets
Diffstat (limited to 'Tests/RunCMake/CMakePresets/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CMakePresets/RunCMakeTest.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
index 24ac0e9..22425b2 100644
--- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
@@ -118,6 +118,8 @@ run_cmake_presets(EnvCycle)
run_cmake_presets(EmptyEnv)
run_cmake_presets(EmptyPenv)
set(CMakePresets_SCHEMA_EXPECTED_RESULT 1)
+run_cmake_presets(ConditionFuture)
+run_cmake_presets(SubConditionNull)
# Test cmakeMinimumRequired field
run_cmake_presets(MinimumRequiredInvalid)
@@ -267,6 +269,12 @@ run_cmake_presets(HostSystemName)
set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/HostSystemNameFuture.json.in")
run_cmake_presets(HostSystemNameFuture)
+# Test conditions
+set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/Conditions.json.in")
+run_cmake_presets(ListConditions --list-presets)
+run_cmake_presets(SimpleTrue)
+run_cmake_presets(SimpleFalse)
+
# Test the example from the documentation
file(READ "${RunCMake_SOURCE_DIR}/../../../Help/manual/presets/example.json" _example)
string(REPLACE "\"generator\": \"Ninja\"" "\"generator\": \"@RunCMake_GENERATOR@\"" _example "${_example}")