summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsFile.h
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-03-10 21:30:19 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-03-15 18:41:42 (GMT)
commit69527a1979093a5fb103c1940f0f0b17d97b45e2 (patch)
treea4c63da3675f65e5f291235360518b978db2dda2 /Source/cmCMakePresetsFile.h
parentad19da011d5702da3407a17bf45f3d39ec651639 (diff)
downloadCMake-69527a1979093a5fb103c1940f0f0b17d97b45e2.zip
CMake-69527a1979093a5fb103c1940f0f0b17d97b45e2.tar.gz
CMake-69527a1979093a5fb103c1940f0f0b17d97b45e2.tar.bz2
Refactor: Pass CMakePresets.json version to ExpandMacros() functions
Diffstat (limited to 'Source/cmCMakePresetsFile.h')
-rw-r--r--Source/cmCMakePresetsFile.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmCMakePresetsFile.h b/Source/cmCMakePresetsFile.h
index 517215d..eed0eab 100644
--- a/Source/cmCMakePresetsFile.h
+++ b/Source/cmCMakePresetsFile.h
@@ -294,6 +294,13 @@ public:
std::vector<std::string> TestPresetOrder;
std::string SourceDir;
+ int Version;
+ int UserVersion;
+
+ int GetVersion(const Preset& preset) const
+ {
+ return preset.User ? this->UserVersion : this->Version;
+ }
static std::string GetFilename(const std::string& sourceDir);
static std::string GetUserFilename(const std::string& sourceDir);