summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsGraphInternal.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-01-05 18:57:48 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-01-06 23:52:30 (GMT)
commit84d440caace3f65ef6ddd197098f8d83c0ecef70 (patch)
treea0b3160457f5172b72efc33919467ddcc00167d3 /Source/cmCMakePresetsGraphInternal.h
parentfd6ea2f67fc5fd1aee27ae92d6a16bc0fba1209e (diff)
downloadCMake-84d440caace3f65ef6ddd197098f8d83c0ecef70.zip
CMake-84d440caace3f65ef6ddd197098f8d83c0ecef70.tar.gz
CMake-84d440caace3f65ef6ddd197098f8d83c0ecef70.tar.bz2
Refactor: Split JSON processing into configure, build, and test presets
Split up the file so that it won't be too big on some systems.
Diffstat (limited to 'Source/cmCMakePresetsGraphInternal.h')
-rw-r--r--Source/cmCMakePresetsGraphInternal.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/Source/cmCMakePresetsGraphInternal.h b/Source/cmCMakePresetsGraphInternal.h
index b2e6791..f7c7349 100644
--- a/Source/cmCMakePresetsGraphInternal.h
+++ b/Source/cmCMakePresetsGraphInternal.h
@@ -1,8 +1,13 @@
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include <memory>
+#include <string>
+#include <vector>
+
+#include <cm3p/json/value.h>
#include "cmCMakePresetsGraph.h"
+#include "cmJSONHelpers.h"
#define CHECK_OK(expr) \
do { \
@@ -109,4 +114,50 @@ public:
std::unique_ptr<Condition> SubCondition;
};
+
+cmCMakePresetsGraph::ReadFileResult PresetStringHelper(
+ std::string& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetVectorStringHelper(
+ std::vector<std::string>& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetBoolHelper(bool& out,
+ const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetOptionalBoolHelper(
+ cm::optional<bool>& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetIntHelper(int& out,
+ const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetOptionalIntHelper(
+ cm::optional<int>& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetVectorIntHelper(
+ std::vector<int>& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult ConfigurePresetsHelper(
+ std::vector<cmCMakePresetsGraph::ConfigurePreset>& out,
+ const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult BuildPresetsHelper(
+ std::vector<cmCMakePresetsGraph::BuildPreset>& out,
+ const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult TestPresetsHelper(
+ std::vector<cmCMakePresetsGraph::TestPreset>& out, const Json::Value* value);
+
+cmJSONHelper<std::nullptr_t, cmCMakePresetsGraph::ReadFileResult> VendorHelper(
+ cmCMakePresetsGraph::ReadFileResult error);
+
+cmCMakePresetsGraph::ReadFileResult PresetConditionHelper(
+ std::shared_ptr<cmCMakePresetsGraph::Condition>& out,
+ const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult PresetVectorOneOrMoreStringHelper(
+ std::vector<std::string>& out, const Json::Value* value);
+
+cmCMakePresetsGraph::ReadFileResult EnvironmentMapHelper(
+ std::map<std::string, cm::optional<std::string>>& out,
+ const Json::Value* value);
}