summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCMakePresetsFile.h')
-rw-r--r--Source/cmCMakePresetsFile.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/cmCMakePresetsFile.h b/Source/cmCMakePresetsFile.h
index 70ec4c5..87797d7 100644
--- a/Source/cmCMakePresetsFile.h
+++ b/Source/cmCMakePresetsFile.h
@@ -102,8 +102,15 @@ public:
}
};
+ class PresetPair
+ {
+ public:
+ UnexpandedPreset Unexpanded;
+ cm::optional<ExpandedPreset> Expanded;
+ };
+
std::string SourceDir;
- std::map<std::string, UnexpandedPreset> Presets;
+ std::map<std::string, PresetPair> Presets;
std::vector<std::string> PresetOrder;
enum class ReadFileResult
@@ -123,6 +130,7 @@ public:
DUPLICATE_PRESETS,
CYCLIC_PRESET_INHERITANCE,
USER_PRESET_INHERITANCE,
+ INVALID_MACRO_EXPANSION,
};
static std::string GetFilename(const std::string& sourceDir);
@@ -131,11 +139,9 @@ public:
bool allowNoFiles = false);
static const char* ResultToString(ReadFileResult result);
- cm::optional<ExpandedPreset> ExpandMacros(
- const UnexpandedPreset& preset) const;
-
private:
- ReadFileResult ReadJSONFile(
- const std::string& filename, std::vector<std::string>& presetOrder,
- std::map<std::string, UnexpandedPreset>& presetMap, bool user);
+ ReadFileResult ReadJSONFile(const std::string& filename,
+ std::vector<std::string>& presetOrder,
+ std::map<std::string, PresetPair>& presetMap,
+ bool user);
};