summaryrefslogtreecommitdiff
path: root/Source/cmTargetPropertyComputer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetPropertyComputer.h')
-rw-r--r--Source/cmTargetPropertyComputer.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h
index df34f188d..f87b7c2d2 100644
--- a/Source/cmTargetPropertyComputer.h
+++ b/Source/cmTargetPropertyComputer.h
@@ -8,6 +8,7 @@
#include <string>
#include "cmListFileCache.h"
+#include "cmProperty.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -18,11 +19,11 @@ class cmTargetPropertyComputer
{
public:
template <typename Target>
- static const char* GetProperty(Target const* tgt, const std::string& prop,
- cmMessenger* messenger,
- cmListFileBacktrace const& context)
+ static cmProp GetProperty(Target const* tgt, const std::string& prop,
+ cmMessenger* messenger,
+ cmListFileBacktrace const& context)
{
- if (const char* loc = GetLocation(tgt, prop, messenger, context)) {
+ if (cmProp loc = GetLocation(tgt, prop, messenger, context)) {
return loc;
}
if (cmSystemTools::GetFatalErrorOccured()) {
@@ -52,9 +53,9 @@ private:
std::string const& config);
template <typename Target>
- static const char* GetLocation(Target const* tgt, std::string const& prop,
- cmMessenger* messenger,
- cmListFileBacktrace const& context)
+ static cmProp GetLocation(Target const* tgt, std::string const& prop,
+ cmMessenger* messenger,
+ cmListFileBacktrace const& context)
{
// Watch for special "computed" properties that are dependent on
@@ -71,7 +72,7 @@ private:
context)) {
return nullptr;
}
- return ComputeLocationForBuild(tgt).c_str();
+ return &ComputeLocationForBuild(tgt);
}
// Support "LOCATION_<CONFIG>".
@@ -82,7 +83,7 @@ private:
return nullptr;
}
std::string configName = prop.substr(9);
- return ComputeLocation(tgt, configName).c_str();
+ return &ComputeLocation(tgt, configName);
}
// Support "<CONFIG>_LOCATION".
@@ -95,7 +96,7 @@ private:
context)) {
return nullptr;
}
- return ComputeLocation(tgt, configName).c_str();
+ return &ComputeLocation(tgt, configName);
}
}
}
@@ -103,8 +104,8 @@ private:
}
template <typename Target>
- static const char* GetSources(Target const* tgt, cmMessenger* messenger,
- cmListFileBacktrace const& context);
+ static cmProp GetSources(Target const* tgt, cmMessenger* messenger,
+ cmListFileBacktrace const& context);
};
#endif