diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 10515c2..7af0edd 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -78,7 +78,7 @@ const std::string& cmTargetPropertyComputer::ComputeLocation<cmTarget>( } template <> -const char* cmTargetPropertyComputer::GetSources<cmTarget>( +cmProp cmTargetPropertyComputer::GetSources<cmTarget>( cmTarget const* tgt, cmMessenger* messenger, cmListFileBacktrace const& context) { @@ -156,7 +156,7 @@ const char* cmTargetPropertyComputer::GetSources<cmTarget>( } static std::string srcs; srcs = ss.str(); - return srcs.c_str(); + return &srcs; } class cmTargetInternals @@ -1613,7 +1613,9 @@ const char* cmTarget::GetComputedProperty( const std::string& prop, cmMessenger* messenger, cmListFileBacktrace const& context) const { - return cmTargetPropertyComputer::GetProperty(this, prop, messenger, context); + cmProp retVal = + cmTargetPropertyComputer::GetProperty(this, prop, messenger, context); + return retVal ? retVal->c_str() : nullptr; } const char* cmTarget::GetProperty(const std::string& prop) const |