summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-14 13:28:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-14 13:28:12 (GMT)
commitd96e139f76a27c74d057cba8156cc495cf2b4151 (patch)
treee1dc53fbe0421cb92baf082e9540136ae774f328 /Source
parent0cfd55788326b98eedb77be9d9f8f821effae9b4 (diff)
parent7a8ca8f8428abf823e818753460d9f8931dc5da8 (diff)
downloadCMake-d96e139f76a27c74d057cba8156cc495cf2b4151.zip
CMake-d96e139f76a27c74d057cba8156cc495cf2b4151.tar.gz
CMake-d96e139f76a27c74d057cba8156cc495cf2b4151.tar.bz2
Merge topic 'list_presets'
7a8ca8f842 cmCMakePresetsGraph: do not set default value for TestOutputTruncation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Tested-by: Robert Maynard <robertjmaynard@gmail.com> Acked-by: Robert Maynard <robertjmaynard@gmail.com> Merge-request: !7170
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCMakePresetsGraphReadJSON.cxx2
-rw-r--r--Source/cmCMakePresetsGraphReadJSONTestPresets.cxx10
2 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmCMakePresetsGraphReadJSON.cxx b/Source/cmCMakePresetsGraphReadJSON.cxx
index e68f0fa..0d3a91f 100644
--- a/Source/cmCMakePresetsGraphReadJSON.cxx
+++ b/Source/cmCMakePresetsGraphReadJSON.cxx
@@ -569,7 +569,7 @@ cmCMakePresetsGraph::ReadFileResult cmCMakePresetsGraph::ReadJSONFile(
}
// Support for TestOutputTruncation added in version 5.
- if (v < 5 && preset.Output) {
+ if (v < 5 && preset.Output && preset.Output->TestOutputTruncation) {
return ReadFileResult::TEST_OUTPUT_TRUNCATION_UNSUPPORTED;
}
diff --git a/Source/cmCMakePresetsGraphReadJSONTestPresets.cxx b/Source/cmCMakePresetsGraphReadJSONTestPresets.cxx
index 43eccfe..b874575 100644
--- a/Source/cmCMakePresetsGraphReadJSONTestPresets.cxx
+++ b/Source/cmCMakePresetsGraphReadJSONTestPresets.cxx
@@ -58,10 +58,10 @@ auto const TestPresetOptionalOutputVerbosityHelper =
TestPresetOutputVerbosityHelper);
ReadFileResult TestPresetOutputTruncationHelper(
- cmCTestTypes::TruncationMode& out, const Json::Value* value)
+ cm::optional<cmCTestTypes::TruncationMode>& out, const Json::Value* value)
{
if (!value) {
- out = cmCTestTypes::TruncationMode::Tail;
+ out = cm::nullopt;
return ReadFileResult::READ_OK;
}
@@ -87,10 +87,6 @@ ReadFileResult TestPresetOutputTruncationHelper(
return ReadFileResult::INVALID_PRESET;
}
-auto const TestPresetOptionalTruncationHelper =
- cmJSONOptionalHelper<cmCTestTypes::TruncationMode, ReadFileResult>(
- ReadFileResult::READ_OK, TestPresetOutputTruncationHelper);
-
auto const TestPresetOptionalOutputHelper =
cmJSONOptionalHelper<TestPreset::OutputOptions, ReadFileResult>(
ReadFileResult::READ_OK,
@@ -121,7 +117,7 @@ auto const TestPresetOptionalOutputHelper =
cmCMakePresetsGraphInternal::PresetOptionalIntHelper, false)
.Bind("testOutputTruncation"_s,
&TestPreset::OutputOptions::TestOutputTruncation,
- TestPresetOptionalTruncationHelper, false)
+ TestPresetOutputTruncationHelper, false)
.Bind("maxTestNameWidth"_s, &TestPreset::OutputOptions::MaxTestNameWidth,
cmCMakePresetsGraphInternal::PresetOptionalIntHelper, false));