summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsFile.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-09-29 14:17:10 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-10-05 13:49:59 (GMT)
commit8617479061039e2b357b7efc922f1b88648dce42 (patch)
tree41d37c685e178b73cf5122b5741fdcf9e4898d06 /Source/cmCMakePresetsFile.cxx
parent06128cf94964697279970a80ddfc1ce2ef7b4da5 (diff)
downloadCMake-8617479061039e2b357b7efc922f1b88648dce42.zip
CMake-8617479061039e2b357b7efc922f1b88648dce42.tar.gz
CMake-8617479061039e2b357b7efc922f1b88648dce42.tar.bz2
CMake: Add presets functionality
Diffstat (limited to 'Source/cmCMakePresetsFile.cxx')
-rw-r--r--Source/cmCMakePresetsFile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCMakePresetsFile.cxx b/Source/cmCMakePresetsFile.cxx
index 0c77768..25997fd 100644
--- a/Source/cmCMakePresetsFile.cxx
+++ b/Source/cmCMakePresetsFile.cxx
@@ -94,7 +94,7 @@ ReadFileResult VariableHelper(cm::optional<CacheVariable>& out,
return ReadFileResult::READ_OK;
}
if (value->isObject()) {
- out = CacheVariable{};
+ out.emplace();
return VariableObjectHelper(*out, value);
}
if (value->isNull()) {
@@ -701,7 +701,7 @@ cmCMakePresetsFile::ExpandMacros(const UnexpandedPreset& preset) const
}
}
- return retval;
+ return cm::make_optional(retval);
}
cmCMakePresetsFile::ReadFileResult cmCMakePresetsFile::ReadJSONFile(