diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-19 17:41:30 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-21 13:20:52 (GMT) |
commit | 638557cbfe0618d5a0fc6f9088e34aac708f5519 (patch) | |
tree | 306150b829afe8b1a538fb891f023d9b59ff7a7b /Tests/RunCMake/CMakePresets/RunCMakeTest.cmake | |
parent | ec3b3d2c2f16397b9a40f79a9783f3d207088b93 (diff) | |
download | CMake-638557cbfe0618d5a0fc6f9088e34aac708f5519.zip CMake-638557cbfe0618d5a0fc6f9088e34aac708f5519.tar.gz CMake-638557cbfe0618d5a0fc6f9088e34aac708f5519.tar.bz2 |
CMakePresets.json: Properly report macro expansion errors
Make a distinction between strings which simply use the
$vendor{<...>} macro, which is valid but makes it unusable by CMake,
and strings which actually contain invalid macro expansions.
Fixes: #21308
Diffstat (limited to 'Tests/RunCMake/CMakePresets/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CMakePresets/RunCMakeTest.cmake | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index e0e54f4..dddf05f 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -121,6 +121,13 @@ run_cmake_presets(InvalidCMakeGeneratorConfig) run_cmake_presets(UnknownCMakeGeneratorConfig) run_cmake_presets(EmptyCacheKey) run_cmake_presets(EmptyEnvKey) +set(CMakePresets_SCHEMA_EXPECTED_RESULT 0) +run_cmake_presets(UnclosedMacro) +run_cmake_presets(NoSuchMacro) +run_cmake_presets(EnvCycle) +run_cmake_presets(EmptyEnv) +run_cmake_presets(EmptyPenv) +set(CMakePresets_SCHEMA_EXPECTED_RESULT 1) # Test cmakeMinimumRequired field run_cmake_presets(MinimumRequiredInvalid) @@ -170,13 +177,8 @@ run_cmake_presets(GoodInheritanceMultiSecond) run_cmake_presets(GoodInheritanceMacro) # Test bad preset arguments -run_cmake_presets(UnclosedMacro) -run_cmake_presets(NoSuchMacro) run_cmake_presets(VendorMacro) run_cmake_presets(InvalidGenerator) -run_cmake_presets(EnvCycle) -run_cmake_presets(EmptyEnv) -run_cmake_presets(EmptyPenv) # Test Visual Studio-specific stuff if(RunCMake_GENERATOR MATCHES "^Visual Studio ") |