mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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
This commit is contained in:
committed by
Craig Scott
parent
f2a59d400e
commit
b7d7eca66d
@@ -66,6 +66,9 @@ public:
|
||||
//! Print the cache to a stream
|
||||
void PrintCache(std::ostream&) const;
|
||||
|
||||
//! Get whether or not cache is loaded
|
||||
bool IsCacheLoaded() const { return this->CacheLoaded; }
|
||||
|
||||
//! Get a value from the cache given a key
|
||||
cmProp GetInitializedCacheValue(const std::string& key) const;
|
||||
|
||||
@@ -204,6 +207,7 @@ private:
|
||||
const CacheEntry& e, cmMessenger* messenger) const;
|
||||
|
||||
std::map<std::string, CacheEntry> Cache;
|
||||
bool CacheLoaded = false;
|
||||
|
||||
// Cache version info
|
||||
unsigned int CacheMajorVersion = 0;
|
||||
|
||||
Reference in New Issue
Block a user