summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-27 19:39:55 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-27 19:39:55 (GMT)
commitdd2f81491e6e17681dd18882a8ccfa01fa32a3f7 (patch)
tree6b782de32aeb462333d70747f269b1725e723e00 /Source/cmMakefile.cxx
parent949d32c3067830a1376950fc78dbcde39bc378a8 (diff)
parent7679f9fab099e729b61320927a9e0b8d03546f7f (diff)
downloadCMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.zip
CMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.tar.gz
CMake-dd2f81491e6e17681dd18882a8ccfa01fa32a3f7.tar.bz2
Merge branch 'dev/add_test-working-directory' into dev/strict-mode
Conflicts: Tests/CMakeLists.txt
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c6e34f8..ef81529 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1392,8 +1392,8 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
cmOStringStream e;
e << "Attempt to add link library \""
<< lib << "\" to target \""
- << target << "\" which is not built by this project.";
- cmSystemTools::Error(e.str().c_str());
+ << target << "\" which is not built in this directory.";
+ this->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
}
}
@@ -3786,6 +3786,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name)
return imported->second;
}
+ // Look for a target built in this directory.
+ if(cmTarget* t = this->FindTarget(name))
+ {
+ return t;
+ }
+
// Look for a target built in this project.
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
}