diff options
author | Brad King <brad.king@kitware.com> | 2018-07-03 15:26:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-03 16:54:32 (GMT) |
commit | 84ecbf44b6d3953bb7f33dd48c4382bc3c15f519 (patch) | |
tree | cbca85f3113985013e81149df74de9880ad2b29e /Source | |
parent | 890be0145def8d9c469fcaf6db1e7e6bc485f6cc (diff) | |
parent | 0d7114987c78085df6449e93bdda8a1749862025 (diff) | |
download | CMake-84ecbf44b6d3953bb7f33dd48c4382bc3c15f519.zip CMake-84ecbf44b6d3953bb7f33dd48c4382bc3c15f519.tar.gz CMake-84ecbf44b6d3953bb7f33dd48c4382bc3c15f519.tar.bz2 |
Merge branch 'revert-subdirectory-linking' into release-3.12
Merge-request: !2191
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 73f9a2e..1bbcf46 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -365,7 +365,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, if (this->CurrentProcessingState != ProcessingKeywordLinkInterface && this->CurrentProcessingState != ProcessingPlainLinkInterface) { - // Find target on the LHS locally + // Assure that the target on the LHS was created in the current directory. cmTarget* t = this->Makefile->FindLocalNonAliasTarget(this->Target->GetName()); if (!t) { @@ -378,18 +378,11 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, } } } - - // If no local target has been found, find it in the global scope - if (!t) { - t = this->Makefile->GetGlobalGenerator()->FindTarget( - this->Target->GetName(), true); - } - if (!t) { std::ostringstream e; e << "Attempt to add link library \"" << lib << "\" to target \"" << this->Target->GetName() - << "\" which does not exist or is an alias target."; + << "\" which is not built in this directory."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); return false; } |