diff options
author | Brad King <brad.king@kitware.com> | 2015-06-23 18:56:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-25 13:14:26 (GMT) |
commit | 30c2e1dd16e061fbabffa35816cb893d81ff0dcf (patch) | |
tree | e4409727504fc359fe48c8509601fc124277e371 /Source/cmTarget.h | |
parent | a6916a6c6e397bda8b381f65dbfc59d3c52f8525 (diff) | |
download | CMake-30c2e1dd16e061fbabffa35816cb893d81ff0dcf.zip CMake-30c2e1dd16e061fbabffa35816cb893d81ff0dcf.tar.gz CMake-30c2e1dd16e061fbabffa35816cb893d81ff0dcf.tar.bz2 |
cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626)
Since commit v3.3.0-rc1~62^2~5 (cmTarget: Store only cmListFileContext
for CMP0023 handling, 2015-05-18) a call to target_link_libraries on a
target that was defined in another (non-ancestor) directory crashes
because no execution context is left active. Fix this by getting the
execution context from the actual cmMakefile where the current
target_link_libraries call takes place. Test this by verifying that
such calls correctly produce an error diagnostic instead of crashing.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2150b83..3eb9e7e 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, |