summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-23 18:56:47 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-25 13:14:26 (GMT)
commit30c2e1dd16e061fbabffa35816cb893d81ff0dcf (patch)
treee4409727504fc359fe48c8509601fc124277e371 /Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt
parenta6916a6c6e397bda8b381f65dbfc59d3c52f8525 (diff)
downloadCMake-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/SubDirTarget-stderr.txt')
-rw-r--r--Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt b/Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt
new file mode 100644
index 0000000..5cd1f23
--- /dev/null
+++ b/Tests/RunCMake/target_link_libraries/SubDirTarget-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at SubDirTarget.cmake:[0-9]+ \(target_link_libraries\):
+ Attempt to add link library "m" to target "subexe" which is not built in
+ this directory.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$