summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx11
-rw-r--r--Source/cmTarget.cxx24
2 files changed, 22 insertions, 13 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 7589520..e24c52d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1837,12 +1837,17 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName,
// found is part of the inName
if(cmSystemTools::FileIsFullPath(inName))
{
- std::string tLocation = target->GetLocation(config);
- tLocation = cmSystemTools::GetFilenamePath(tLocation);
+ std::string tLocation;
+ if(target->GetType() >= cmTarget::EXECUTABLE &&
+ target->GetType() <= cmTarget::MODULE_LIBRARY)
+ {
+ tLocation = target->GetLocation(config);
+ tLocation = cmSystemTools::GetFilenamePath(tLocation);
+ tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
+ }
std::string depLocation = cmSystemTools::GetFilenamePath(
std::string(inName));
depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
- tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
if(depLocation != tLocation)
{
// it is a full path to a depend that has the same name
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3882253..0890644 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1244,17 +1244,21 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
// the fact that the name matched a target was just a coincidence.
if(cmSystemTools::FileIsFullPath(dep.c_str()))
{
- // This is really only for compatibility so we do not need to
- // worry about configuration names and output names.
- std::string tLocation = t->GetLocation(0);
- tLocation = cmSystemTools::GetFilenamePath(tLocation);
- std::string depLocation = cmSystemTools::GetFilenamePath(dep);
- depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
- tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
- if(depLocation == tLocation)
+ if(t->GetType() >= cmTarget::EXECUTABLE &&
+ t->GetType() <= cmTarget::MODULE_LIBRARY)
{
- this->Target->AddUtility(util.c_str());
- return true;
+ // This is really only for compatibility so we do not need to
+ // worry about configuration names and output names.
+ std::string tLocation = t->GetLocation(0);
+ tLocation = cmSystemTools::GetFilenamePath(tLocation);
+ std::string depLocation = cmSystemTools::GetFilenamePath(dep);
+ depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str());
+ tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str());
+ if(depLocation == tLocation)
+ {
+ this->Target->AddUtility(util.c_str());
+ return true;
+ }
}
}
else