diff options
Diffstat (limited to 'Source/cmFileAPICache.cxx')
-rw-r--r-- | Source/cmFileAPICache.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmFileAPICache.cxx b/Source/cmFileAPICache.cxx index ef7779567..3ba943a45 100644 --- a/Source/cmFileAPICache.cxx +++ b/Source/cmFileAPICache.cxx @@ -7,9 +7,10 @@ #include <utility> #include <vector> -#include "cm_jsoncpp_value.h" +#include <cm3p/json/value.h> #include "cmFileAPI.h" +#include "cmProperty.h" #include "cmState.h" #include "cmake.h" @@ -67,7 +68,7 @@ Json::Value Cache::DumpEntry(std::string const& name) entry["name"] = name; entry["type"] = cmState::CacheEntryTypeToString(this->State->GetCacheEntryType(name)); - entry["value"] = this->State->GetCacheEntryValue(name); + entry["value"] = this->State->GetSafeCacheEntryValue(name); Json::Value properties = this->DumpEntryProperties(name); if (!properties.empty()) { @@ -94,7 +95,8 @@ Json::Value Cache::DumpEntryProperty(std::string const& name, { Json::Value property = Json::objectValue; property["name"] = prop; - property["value"] = this->State->GetCacheEntryProperty(name, prop); + cmProp p = this->State->GetCacheEntryProperty(name, prop); + property["value"] = p ? *p : ""; return property; } } |