1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
9 #include <cm3p/json/value.h>
11 #include "cmJSONHelpers.h"
15 namespace cmCMakePresetsErrors
{
16 const Json::Value
* getPreset(cmJSONState
* state
);
18 std::string
getPresetName(cmJSONState
* state
);
20 std::string
getVariableName(cmJSONState
* state
);
22 void FILE_NOT_FOUND(const std::string
& filename
, cmJSONState
* state
);
24 void INVALID_ROOT(const Json::Value
* value
, cmJSONState
* state
);
26 void NO_VERSION(const Json::Value
* value
, cmJSONState
* state
);
28 void INVALID_VERSION(const Json::Value
* value
, cmJSONState
* state
);
30 void UNRECOGNIZED_VERSION(const Json::Value
* value
, cmJSONState
* state
);
32 void INVALID_PRESETS(const Json::Value
* value
, cmJSONState
* state
);
34 void INVALID_PRESET(const Json::Value
* value
, cmJSONState
* state
);
36 void INVALID_PRESET_NAMED(const std::string
& presetName
, cmJSONState
* state
);
38 void INVALID_VARIABLE(const Json::Value
* value
, cmJSONState
* state
);
40 void DUPLICATE_PRESETS(const std::string
& presetName
, cmJSONState
* state
);
42 void CYCLIC_PRESET_INHERITANCE(const std::string
& presetName
,
45 void INHERITED_PRESET_UNREACHABLE_FROM_FILE(const std::string
& presetName
,
48 void CONFIGURE_PRESET_UNREACHABLE_FROM_FILE(const std::string
& presetName
,
51 void INVALID_MACRO_EXPANSION(const std::string
& presetName
,
54 void BUILD_TEST_PRESETS_UNSUPPORTED(const Json::Value
*, cmJSONState
* state
);
56 void PACKAGE_PRESETS_UNSUPPORTED(const Json::Value
*, cmJSONState
* state
);
58 void WORKFLOW_PRESETS_UNSUPPORTED(const Json::Value
*, cmJSONState
* state
);
60 void INCLUDE_UNSUPPORTED(const Json::Value
*, cmJSONState
* state
);
62 void INVALID_INCLUDE(const Json::Value
* value
, cmJSONState
* state
);
64 void INVALID_CONFIGURE_PRESET(const std::string
& presetName
,
67 void INSTALL_PREFIX_UNSUPPORTED(const Json::Value
* value
, cmJSONState
* state
);
69 void CONDITION_UNSUPPORTED(cmJSONState
* state
);
71 void TOOLCHAIN_FILE_UNSUPPORTED(cmJSONState
* state
);
73 void GRAPHVIZ_FILE_UNSUPPORTED(cmJSONState
* state
);
75 void CYCLIC_INCLUDE(const std::string
& file
, cmJSONState
* state
);
77 void TEST_OUTPUT_TRUNCATION_UNSUPPORTED(cmJSONState
* state
);
79 void INVALID_WORKFLOW_STEPS(const std::string
& workflowStep
,
82 void NO_WORKFLOW_STEPS(const std::string
& presetName
, cmJSONState
* state
);
84 void FIRST_WORKFLOW_STEP_NOT_CONFIGURE(const std::string
& stepName
,
87 void CONFIGURE_WORKFLOW_STEP_NOT_FIRST(const std::string
& stepName
,
90 void WORKFLOW_STEP_UNREACHABLE_FROM_FILE(const std::string
& workflowStep
,
93 void CTEST_JUNIT_UNSUPPORTED(cmJSONState
* state
);
95 void TRACE_UNSUPPORTED(cmJSONState
* state
);
97 JsonErrors::ErrorGenerator
UNRECOGNIZED_VERSION_RANGE(int min
, int max
);
99 JsonErrors::ErrorGenerator
UNRECOGNIZED_CMAKE_VERSION(
100 const std::string
& version
, int current
, int required
);
102 void INVALID_PRESET_NAME(const Json::Value
* value
, cmJSONState
* state
);
104 void INVALID_CONDITION(const Json::Value
* value
, cmJSONState
* state
);
106 JsonErrors::ErrorGenerator
INVALID_CONDITION_OBJECT(
107 JsonErrors::ObjectError errorType
, const Json::Value::Members
& extraFields
);
109 JsonErrors::ErrorGenerator
INVALID_VARIABLE_OBJECT(
110 JsonErrors::ObjectError errorType
, const Json::Value::Members
& extraFields
);
112 JsonErrors::ErrorGenerator
INVALID_PRESET_OBJECT(
113 JsonErrors::ObjectError errorType
, const Json::Value::Members
& extraFields
);
115 JsonErrors::ErrorGenerator
INVALID_ROOT_OBJECT(
116 JsonErrors::ObjectError errorType
, const Json::Value::Members
& extraFields
);
118 void PRESET_MISSING_FIELD(const std::string
& presetName
,
119 const std::string
& missingField
, cmJSONState
* state
);
121 void SCHEMA_UNSUPPORTED(cmJSONState
* state
);