summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-02-04 16:06:46 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-02-04 19:13:07 (GMT)
commit16a4ba5b311669000d83c99b1b985597205d3d69 (patch)
treed488198bc202d2daa0ef63a11fc47d81e420f801 /Source/cmState.cxx
parent2ac835b9f9a7a4dec16c498a51c0dbc3d64844bc (diff)
downloadCMake-16a4ba5b311669000d83c99b1b985597205d3d69.zip
CMake-16a4ba5b311669000d83c99b1b985597205d3d69.tar.gz
CMake-16a4ba5b311669000d83c99b1b985597205d3d69.tar.bz2
Ninja Multi-Config: Use build.ninja if cmake --build has no --config
If cmake --build is called with no --config argument, and a build.ninja file is available, use that instead of defaulting to the Debug config.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 0ce8dd7..9fc7615 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -141,6 +141,16 @@ const char* cmState::GetCacheEntryValue(std::string const& key) const
return e->Value.c_str();
}
+std::string cmState::GetSafeCacheEntryValue(std::string const& key) const
+{
+ std::string retval;
+ auto val = this->GetCacheEntryValue(key);
+ if (val) {
+ retval = val;
+ }
+ return retval;
+}
+
const std::string* cmState::GetInitializedCacheValue(
std::string const& key) const
{