summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-08 17:22:13 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-08 17:22:13 (GMT)
commita765c491adc47c05ce0da933c9cb8aae84f5e530 (patch)
tree79915e212dada62e97185711e1dbdb7c9488e0db /Source/cmTarget.cxx
parente01cce28694201342adc97825982ed66fc52af65 (diff)
downloadCMake-a765c491adc47c05ce0da933c9cb8aae84f5e530.zip
CMake-a765c491adc47c05ce0da933c9cb8aae84f5e530.tar.gz
CMake-a765c491adc47c05ce0da933c9cb8aae84f5e530.tar.bz2
Honor custom command dependencies on imported targets (#10395)
Imported targets do not themselves build, but we can follow dependencies through them to find real targets. This allows imported targets to depend on custom targets that provide the underlying files at build time.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ca61b1f..c82c11e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1357,8 +1357,8 @@ bool cmTargetTraceDependencies::IsUtility(std::string const& dep)
util = cmSystemTools::GetFilenameWithoutLastExtension(util);
}
- // Check for a non-imported target with this name.
- if(cmTarget* t = this->GlobalGenerator->FindTarget(0, util.c_str()))
+ // Check for a target with this name.
+ if(cmTarget* t = this->Makefile->FindTargetToUse(util.c_str()))
{
// 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
@@ -1406,8 +1406,8 @@ cmTargetTraceDependencies
cit != cc.GetCommandLines().end(); ++cit)
{
std::string const& command = *cit->begin();
- // Look for a non-imported target with this name.
- if(cmTarget* t = this->GlobalGenerator->FindTarget(0, command.c_str()))
+ // Check for a target with this name.
+ if(cmTarget* t = this->Makefile->FindTargetToUse(command.c_str()))
{
if(t->GetType() == cmTarget::EXECUTABLE)
{