summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-28 18:47:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-27 19:58:50 (GMT)
commit9f2dca805c8010636d4be7ef03d96bfc131c9809 (patch)
tree0fe3e34e2ef5344d53d3d0d5c41f36bb17942321 /Source/cmGeneratorTarget.cxx
parentc7a8e74b8c7ade9efb68b8bd36fd6d741f2dba7e (diff)
downloadCMake-9f2dca805c8010636d4be7ef03d96bfc131c9809.zip
CMake-9f2dca805c8010636d4be7ef03d96bfc131c9809.tar.gz
CMake-9f2dca805c8010636d4be7ef03d96bfc131c9809.tar.bz2
Move GetLocation to cmGeneratorTarget.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index dc5a2a1..9fe7922 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -520,6 +520,26 @@ void cmGeneratorTarget
}
//----------------------------------------------------------------------------
+const char* cmGeneratorTarget::GetLocation(const std::string& config) const
+{
+ static std::string location;
+ if (this->Target->IsImported())
+ {
+ location = this->Target->ImportedGetFullPath(config, false);
+ }
+ else
+ {
+ location = this->Target->GetFullPath(config, false);
+ }
+ return location.c_str();
+}
+
+bool cmGeneratorTarget::IsImported() const
+{
+ return this->Target->IsImported();
+}
+
+//----------------------------------------------------------------------------
bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
const std::string& config) const
{
@@ -834,7 +854,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
}
// Check for a target with this name.
- if(cmTarget* t = this->Makefile->FindTargetToUse(util))
+ if(cmGeneratorTarget* t
+ = this->Makefile->FindGeneratorTargetToUse(util))
{
// If we find the target and the dep was given as a full path,
// then make sure it was not a full path to something else, and
@@ -846,7 +867,7 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
{
// This is really only for compatibility so we do not need to
// worry about configuration names and output names.
- std::string tLocation = t->GetLocationForBuild();
+ std::string tLocation = t->Target->GetLocationForBuild();
tLocation = cmSystemTools::GetFilenamePath(tLocation);
std::string depLocation = cmSystemTools::GetFilenamePath(dep);
depLocation = cmSystemTools::CollapseFullPath(depLocation);