cmCMakePresetsErrors.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <cm3p/json/value.h>
  7. #include "cmJSONHelpers.h"
  8. class cmJSONState;
  9. namespace cmCMakePresetsErrors {
  10. const Json::Value* getPreset(cmJSONState* state);
  11. std::string getPresetName(cmJSONState* state);
  12. std::string getVariableName(cmJSONState* state);
  13. void FILE_NOT_FOUND(const std::string& filename, cmJSONState* state);
  14. void INVALID_ROOT(const Json::Value* value, cmJSONState* state);
  15. void NO_VERSION(const Json::Value* value, cmJSONState* state);
  16. void INVALID_VERSION(const Json::Value* value, cmJSONState* state);
  17. void UNRECOGNIZED_VERSION(const Json::Value* value, cmJSONState* state);
  18. void INVALID_PRESETS(const Json::Value* value, cmJSONState* state);
  19. void INVALID_PRESET(const Json::Value* value, cmJSONState* state);
  20. void INVALID_PRESET_NAMED(const std::string& presetName, cmJSONState* state);
  21. void INVALID_VARIABLE(const Json::Value* value, cmJSONState* state);
  22. void DUPLICATE_PRESETS(const std::string& presetName, cmJSONState* state);
  23. void CYCLIC_PRESET_INHERITANCE(const std::string& presetName,
  24. cmJSONState* state);
  25. void INHERITED_PRESET_UNREACHABLE_FROM_FILE(const std::string& presetName,
  26. cmJSONState* state);
  27. void CONFIGURE_PRESET_UNREACHABLE_FROM_FILE(const std::string& presetName,
  28. cmJSONState* state);
  29. void INVALID_MACRO_EXPANSION(const std::string& presetName,
  30. cmJSONState* state);
  31. void BUILD_TEST_PRESETS_UNSUPPORTED(const Json::Value*, cmJSONState* state);
  32. void PACKAGE_PRESETS_UNSUPPORTED(const Json::Value*, cmJSONState* state);
  33. void WORKFLOW_PRESETS_UNSUPPORTED(const Json::Value*, cmJSONState* state);
  34. void INCLUDE_UNSUPPORTED(const Json::Value*, cmJSONState* state);
  35. void INVALID_INCLUDE(const Json::Value* value, cmJSONState* state);
  36. void INVALID_CONFIGURE_PRESET(const std::string& presetName,
  37. cmJSONState* state);
  38. void INSTALL_PREFIX_UNSUPPORTED(const Json::Value* value, cmJSONState* state);
  39. void CONDITION_UNSUPPORTED(cmJSONState* state);
  40. void TOOLCHAIN_FILE_UNSUPPORTED(cmJSONState* state);
  41. void CYCLIC_INCLUDE(const std::string& file, cmJSONState* state);
  42. void TEST_OUTPUT_TRUNCATION_UNSUPPORTED(cmJSONState* state);
  43. void INVALID_WORKFLOW_STEPS(const std::string& workflowStep,
  44. cmJSONState* state);
  45. void NO_WORKFLOW_STEPS(const std::string& presetName, cmJSONState* state);
  46. void FIRST_WORKFLOW_STEP_NOT_CONFIGURE(const std::string& stepName,
  47. cmJSONState* state);
  48. void CONFIGURE_WORKFLOW_STEP_NOT_FIRST(const std::string& stepName,
  49. cmJSONState* state);
  50. void WORKFLOW_STEP_UNREACHABLE_FROM_FILE(const std::string& workflowStep,
  51. cmJSONState* state);
  52. void CTEST_JUNIT_UNSUPPORTED(cmJSONState* state);
  53. void TRACE_UNSUPPORTED(cmJSONState* state);
  54. JsonErrors::ErrorGenerator UNRECOGNIZED_CMAKE_VERSION(
  55. const std::string& version, int current, int required);
  56. void INVALID_PRESET_NAME(const Json::Value* value, cmJSONState* state);
  57. void INVALID_CONDITION(const Json::Value* value, cmJSONState* state);
  58. JsonErrors::ErrorGenerator INVALID_CONDITION_OBJECT(
  59. JsonErrors::ObjectError errorType, const Json::Value::Members& extraFields);
  60. JsonErrors::ErrorGenerator INVALID_VARIABLE_OBJECT(
  61. JsonErrors::ObjectError errorType, const Json::Value::Members& extraFields);
  62. JsonErrors::ErrorGenerator INVALID_PRESET_OBJECT(
  63. JsonErrors::ObjectError errorType, const Json::Value::Members& extraFields);
  64. JsonErrors::ErrorGenerator INVALID_ROOT_OBJECT(
  65. JsonErrors::ObjectError errorType, const Json::Value::Members& extraFields);
  66. void PRESET_MISSING_FIELD(const std::string& presetName,
  67. const std::string& missingField, cmJSONState* state);
  68. void SCHEMA_UNSUPPORTED(cmJSONState* state);
  69. }