summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetPropertyComputer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetPropertyComputer.h')
-rw-r--r--Source/cmTargetPropertyComputer.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/Source/cmTargetPropertyComputer.h b/Source/cmTargetPropertyComputer.h
index e61a1fc..82c6355 100644
--- a/Source/cmTargetPropertyComputer.h
+++ b/Source/cmTargetPropertyComputer.h
@@ -6,38 +6,35 @@
#include <string>
-#include "cmListFileCache.h"
#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmValue.h"
-class cmMessenger;
+class cmMakefile;
class cmTargetPropertyComputer
{
public:
template <typename Target>
static cmValue GetProperty(Target const* tgt, const std::string& prop,
- cmMessenger* messenger,
- cmListFileBacktrace const& context)
+ cmMakefile const& mf)
{
- if (cmValue loc = GetLocation(tgt, prop, messenger, context)) {
+ if (cmValue loc = GetLocation(tgt, prop, mf)) {
return loc;
}
if (cmSystemTools::GetFatalErrorOccured()) {
return nullptr;
}
if (prop == "SOURCES") {
- return GetSources(tgt, messenger, context);
+ return GetSources(tgt, mf);
}
return nullptr;
}
private:
static bool HandleLocationPropertyPolicy(std::string const& tgtName,
- cmMessenger* messenger,
- cmListFileBacktrace const& context);
+ cmMakefile const& mf);
template <typename Target>
static const std::string& ComputeLocationForBuild(Target const* tgt);
@@ -47,8 +44,7 @@ private:
template <typename Target>
static cmValue GetLocation(Target const* tgt, std::string const& prop,
- cmMessenger* messenger,
- cmListFileBacktrace const& context)
+ cmMakefile const& mf)
{
// Watch for special "computed" properties that are dependent on
@@ -61,8 +57,7 @@ private:
static const std::string propLOCATION = "LOCATION";
if (prop == propLOCATION) {
if (!tgt->IsImported() &&
- !HandleLocationPropertyPolicy(tgt->GetName(), messenger,
- context)) {
+ !HandleLocationPropertyPolicy(tgt->GetName(), mf)) {
return nullptr;
}
return cmValue(ComputeLocationForBuild(tgt));
@@ -71,8 +66,7 @@ private:
// Support "LOCATION_<CONFIG>".
if (cmHasLiteralPrefix(prop, "LOCATION_")) {
if (!tgt->IsImported() &&
- !HandleLocationPropertyPolicy(tgt->GetName(), messenger,
- context)) {
+ !HandleLocationPropertyPolicy(tgt->GetName(), mf)) {
return nullptr;
}
std::string configName = prop.substr(9);
@@ -85,8 +79,7 @@ private:
std::string configName(prop.c_str(), prop.size() - 9);
if (configName != "IMPORTED") {
if (!tgt->IsImported() &&
- !HandleLocationPropertyPolicy(tgt->GetName(), messenger,
- context)) {
+ !HandleLocationPropertyPolicy(tgt->GetName(), mf)) {
return nullptr;
}
return cmValue(ComputeLocation(tgt, configName));
@@ -97,6 +90,5 @@ private:
}
template <typename Target>
- static cmValue GetSources(Target const* tgt, cmMessenger* messenger,
- cmListFileBacktrace const& context);
+ static cmValue GetSources(Target const* tgt, cmMakefile const& mf);
};