summaryrefslogtreecommitdiff
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-10-23 12:37:06 -0400
committerCraig Scott <craig.scott@crascit.com>2020-10-26 22:32:45 +1100
commitb7d7eca66db97f9dcb6068762733f06941c0c05a (patch)
tree17b111e02de883947dd10c1097ae14303906945b /Source/cmState.cxx
parentf2a59d400e9ec2e937f6000000c2e9860e388ca7 (diff)
downloadcmake-b7d7eca66db97f9dcb6068762733f06941c0c05a.tar.gz
CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory, use that directory as the binary directory. Otherwise, use the binary directory from the preset. Fixes: #21311
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index d5ac9ae5a7..d268e62337 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -135,6 +135,11 @@ bool cmState::DeleteCache(const std::string& path)
return this->CacheManager->DeleteCache(path);
}
+bool cmState::IsCacheLoaded() const
+{
+ return this->CacheManager->IsCacheLoaded();
+}
+
std::vector<std::string> cmState::GetCacheEntryKeys() const
{
return this->CacheManager->GetCacheEntryKeys();