diff options
author | Brad King <brad.king@kitware.com> | 2021-07-28 13:14:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-28 13:14:39 (GMT) |
commit | b880867e5aa4037d5fca4c3aafa82ffe60d18dfa (patch) | |
tree | c094de26a076bb619ce3f96c0b51c6e038a41b26 /Source | |
parent | f7cf69e34a1607e8ea2b6d10fef6a6058377c24e (diff) | |
parent | 3e42bf3e0575d8e203405d95fd24065ea6b70495 (diff) | |
download | CMake-b880867e5aa4037d5fca4c3aafa82ffe60d18dfa.zip CMake-b880867e5aa4037d5fca4c3aafa82ffe60d18dfa.tar.gz CMake-b880867e5aa4037d5fca4c3aafa82ffe60d18dfa.tar.bz2 |
Merge topic 'cmake-presets-v2-inherit-v3-optional' into release-3.21
3e42bf3e05 CMakePresets: Check presets with their own file version
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6398
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCMakePresetsFile.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmCMakePresetsFile.cxx b/Source/cmCMakePresetsFile.cxx index fd578fa..538b668 100644 --- a/Source/cmCMakePresetsFile.cxx +++ b/Source/cmCMakePresetsFile.cxx @@ -78,7 +78,8 @@ void InheritVector(std::vector<T>& child, const std::vector<T>& parent) template <class T> ReadFileResult VisitPreset( T& preset, std::map<std::string, cmCMakePresetsFile::PresetPair<T>>& presets, - std::map<std::string, CycleStatus> cycleStatus, int version) + std::map<std::string, CycleStatus> cycleStatus, + const cmCMakePresetsFile& file) { switch (cycleStatus[preset.Name]) { case CycleStatus::InProgress: @@ -108,7 +109,7 @@ ReadFileResult VisitPreset( return ReadFileResult::USER_PRESET_INHERITANCE; } - auto result = VisitPreset(parentPreset, presets, cycleStatus, version); + auto result = VisitPreset(parentPreset, presets, cycleStatus, file); if (result != ReadFileResult::READ_OK) { return result; } @@ -128,7 +129,7 @@ ReadFileResult VisitPreset( preset.ConditionEvaluator.reset(); } - CHECK_OK(preset.VisitPresetAfterInherit(version)) + CHECK_OK(preset.VisitPresetAfterInherit(file.GetVersion(preset))) cycleStatus[preset.Name] = CycleStatus::Verified; return ReadFileResult::READ_OK; @@ -146,8 +147,7 @@ ReadFileResult ComputePresetInheritance( for (auto& it : presets) { auto& preset = it.second.Unexpanded; - auto result = - VisitPreset<T>(preset, presets, cycleStatus, file.GetVersion(preset)); + auto result = VisitPreset<T>(preset, presets, cycleStatus, file); if (result != ReadFileResult::READ_OK) { return result; } |