|  | @@ -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);
 | 
	
		
			
				|  |  |  };
 |