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 /Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake | |
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 'Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake index f97022e..533c6a1 100644 --- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake @@ -6,3 +6,4 @@ run_cmake(CMP0023-WARN-2) run_cmake(CMP0023-NEW-2) run_cmake(MixedSignature) run_cmake(Separate-PRIVATE-LINK_PRIVATE-uses) +run_cmake(SubDirTarget) |