summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-08-16 13:17:09 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-08-16 13:47:29 (GMT)
commit2588bf090ce822de44a470362019c398b2165137 (patch)
treeba0352290c092787bf98fead02b98f00e942c956 /Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx
parente70749e0d65f2bad841de92d3952b9297f326a34 (diff)
downloadCMake-2588bf090ce822de44a470362019c398b2165137.zip
CMake-2588bf090ce822de44a470362019c398b2165137.tar.gz
CMake-2588bf090ce822de44a470362019c398b2165137.tar.bz2
CMakePresets: Make error generators proper functions
And rename cmCMakePresetErrors to cmCMakePresetsErrors.
Diffstat (limited to 'Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx')
-rw-r--r--Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx b/Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx
index 3890cd0..c52a187 100644
--- a/Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx
+++ b/Source/cmCMakePresetsGraphReadJSONConfigurePresets.cxx
@@ -12,7 +12,7 @@
#include <cm3p/json/value.h>
-#include "cmCMakePresetErrors.h"
+#include "cmCMakePresetsErrors.h"
#include "cmCMakePresetsGraph.h"
#include "cmCMakePresetsGraphInternal.h"
#include "cmJSONHelpers.h"
@@ -37,7 +37,7 @@ bool ArchToolsetStrategyHelper(cm::optional<ArchToolsetStrategy>& out,
}
if (!value->isString()) {
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -51,7 +51,7 @@ bool ArchToolsetStrategyHelper(cm::optional<ArchToolsetStrategy>& out,
return true;
}
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -85,7 +85,7 @@ ArchToolsetHelper(
return objectHelper(out, value, state);
}
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
};
}
@@ -104,7 +104,7 @@ bool TraceEnableModeHelper(cm::optional<TraceEnableMode>& out,
}
if (!value->isString()) {
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -115,7 +115,7 @@ bool TraceEnableModeHelper(cm::optional<TraceEnableMode>& out,
} else if (value->asString() == "expand") {
out = TraceEnableMode::Expand;
} else {
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -131,7 +131,7 @@ bool TraceOutputFormatHelper(cm::optional<TraceOutputFormat>& out,
}
if (!value->isString()) {
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -140,7 +140,7 @@ bool TraceOutputFormatHelper(cm::optional<TraceOutputFormat>& out,
} else if (value->asString() == "json-v1") {
out = TraceOutputFormat::JSONv1;
} else {
- cmCMakePresetErrors::INVALID_PRESET(value, state);
+ cmCMakePresetsErrors::INVALID_PRESET(value, state);
return false;
}
@@ -167,7 +167,7 @@ bool VariableValueHelper(std::string& out, const Json::Value* value,
auto const VariableObjectHelper =
JSONHelperBuilder::Object<CacheVariable>(
- cmCMakePresetErrors::INVALID_VARIABLE_OBJECT, false)
+ cmCMakePresetsErrors::INVALID_VARIABLE_OBJECT, false)
.Bind("type"_s, &CacheVariable::Type, VariableStringHelper, false)
.Bind("value"_s, &CacheVariable::Value, VariableValueHelper);
@@ -196,13 +196,13 @@ bool VariableHelper(cm::optional<CacheVariable>& out, const Json::Value* value,
out = cm::nullopt;
return true;
}
- cmCMakePresetErrors::INVALID_VARIABLE(value, state);
+ cmCMakePresetsErrors::INVALID_VARIABLE(value, state);
return false;
}
auto const VariablesHelper =
JSONHelperBuilder::Map<cm::optional<CacheVariable>>(
- cmCMakePresetErrors::INVALID_PRESET, VariableHelper);
+ cmCMakePresetsErrors::INVALID_PRESET, VariableHelper);
auto const PresetWarningsHelper =
JSONHelperBuilder::Object<ConfigurePreset>(
@@ -238,7 +238,7 @@ auto const PresetDebugHelper =
auto const PresetTraceHelper =
JSONHelperBuilder::Object<ConfigurePreset>(
- cmCMakePresetErrors::INVALID_PRESET_OBJECT, false)
+ cmCMakePresetsErrors::INVALID_PRESET_OBJECT, false)
.Bind("mode"_s, &ConfigurePreset::TraceMode, TraceEnableModeHelper, false)
.Bind("format"_s, &ConfigurePreset::TraceFormat, TraceOutputFormatHelper,
false)
@@ -250,7 +250,7 @@ auto const PresetTraceHelper =
auto const ConfigurePresetHelper =
JSONHelperBuilder::Object<ConfigurePreset>(
- cmCMakePresetErrors::INVALID_PRESET_OBJECT, false)
+ cmCMakePresetsErrors::INVALID_PRESET_OBJECT, false)
.Bind("name"_s, &ConfigurePreset::Name,
cmCMakePresetsGraphInternal::PresetNameHelper)
.Bind("inherits"_s, &ConfigurePreset::Inherits,
@@ -260,7 +260,7 @@ auto const ConfigurePresetHelper =
cmCMakePresetsGraphInternal::PresetBoolHelper, false)
.Bind<std::nullptr_t>("vendor"_s, nullptr,
cmCMakePresetsGraphInternal::VendorHelper(
- cmCMakePresetErrors::INVALID_PRESET),
+ cmCMakePresetsErrors::INVALID_PRESET),
false)
.Bind("displayName"_s, &ConfigurePreset::DisplayName,
cmCMakePresetsGraphInternal::PresetStringHelper, false)
@@ -295,7 +295,7 @@ bool ConfigurePresetsHelper(std::vector<ConfigurePreset>& out,
const Json::Value* value, cmJSONState* state)
{
static auto const helper = JSONHelperBuilder::Vector<ConfigurePreset>(
- cmCMakePresetErrors::INVALID_PRESETS, ConfigurePresetHelper);
+ cmCMakePresetsErrors::INVALID_PRESETS, ConfigurePresetHelper);
return helper(out, value, state);
}