From e126db1f71f84125ebabcab73f84013347ab21cd Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 21 Jun 2007 13:08:22 -0400 Subject: [PATCH] BUG: handle dependencies to imported targets better: don't create a dependency if the target name was not listed in DEPENDS, if it was listed in DEPENDS, create a dependency to the file Seems to work, but have to check with Brad. Alex --- Source/cmLocalGenerator.cxx | 2 +- Source/cmTarget.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 222e60896..5742fd59f 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1964,7 +1964,7 @@ std::string cmLocalGenerator::GetRealDependency(const char* inName, } // Look for a CMake target with the given name. - if(cmTarget* target = this->GlobalGenerator->FindTarget(0,name.c_str(),false)) + if(cmTarget* target = this->GlobalGenerator->FindTarget(0,name.c_str(),true)) { // make sure it is not just a coincidence that the target name // found is part of the inName diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 46d4273c5..c0e44842a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -538,9 +538,9 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep) util = cmSystemTools::GetFilenameWithoutLastExtension(util); } - // Check for a non-imported target with this name. + // Check for a target with this name. if(cmTarget* t = - this->GlobalGenerator->FindTarget(0, util.c_str(), false)) + this->GlobalGenerator->FindTarget(0, util.c_str(), true)) { // 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