diff options
author | Brad King <brad.king@kitware.com> | 2015-06-26 12:41:16 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-06-26 12:41:16 (GMT) |
commit | 6c098a4a720293c32ae308bee351e3431a350ab0 (patch) | |
tree | 8d97e3e4af6c995317bc04ec4d42e7990ebdbd3e /Source | |
parent | 086b19aeda24bab60f7e4cd17feb2e3a070878a9 (diff) | |
parent | 30c2e1dd16e061fbabffa35816cb893d81ff0dcf (diff) | |
download | CMake-6c098a4a720293c32ae308bee351e3431a350ab0.zip CMake-6c098a4a720293c32ae308bee351e3431a350ab0.tar.gz CMake-6c098a4a720293c32ae308bee351e3431a350ab0.tar.bz2 |
Merge topic 'fix-target_link_libraries-wrong-dir'
30c2e1dd cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 4 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 | ||||
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c7a13bc..4b031bc 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1217,7 +1217,8 @@ static std::string targetNameGenex(const std::string& lib) } //---------------------------------------------------------------------------- -bool cmTarget::PushTLLCommandTrace(TLLSignature signature) +bool cmTarget::PushTLLCommandTrace(TLLSignature signature, + cmListFileContext const& lfc) { bool ret = true; if (!this->TLLCommands.empty()) @@ -1227,7 +1228,6 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature) ret = false; } } - cmListFileContext lfc = this->Makefile->GetExecutionContext(); if (this->TLLCommands.empty() || this->TLLCommands.back().second != lfc) { this->TLLCommands.push_back(std::make_pair(signature, lfc)); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 6916bd3..1920312 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -207,7 +207,8 @@ public: KeywordTLLSignature, PlainTLLSignature }; - bool PushTLLCommandTrace(TLLSignature signature); + bool PushTLLCommandTrace(TLLSignature signature, + cmListFileContext const& lfc); void GetTllSignatureTraces(std::ostringstream &s, TLLSignature sig) const; void MergeLinkLibraries( cmMakefile& mf, const std::string& selfname, diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index df37d66..b57b921 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -368,7 +368,8 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, || this->CurrentProcessingState == ProcessingKeywordPublicInterface || this->CurrentProcessingState == ProcessingKeywordLinkInterface) ? cmTarget::KeywordTLLSignature : cmTarget::PlainTLLSignature; - if (!this->Target->PushTLLCommandTrace(sig)) + if (!this->Target->PushTLLCommandTrace( + sig, this->Makefile->GetExecutionContext())) { std::ostringstream e; const char *modal = 0; |