summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ba0d672..cba29eb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -791,7 +791,24 @@ cmMakefile::AddCustomCommandToTarget(const std::string& target,
if(issueMessage)
{
- e << "The target name \"" << target << "\" is unknown in this context.";
+ if (cmTarget const* t = this->FindTargetToUse(target))
+ {
+ if (t->IsImported())
+ {
+ e << "TARGET '" << target
+ << "' is IMPORTED and does not build here.";
+ }
+ else
+ {
+ e << "TARGET '" << target
+ << "' was not created in this directory.";
+ }
+ }
+ else
+ {
+ e << "No TARGET '" << target
+ << "' has been created in this directory.";
+ }
IssueMessage(messageType, e.str());
}