summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-22 14:58:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-22 19:29:43 (GMT)
commit52c95540b722926ba833ead05a575189bdabf84e (patch)
treeb620d3dfeaabb69d61a9e3c2413a0d73692d6968 /Tests
parent0d64c3abd13a0b14f1a14b7717dbac8988d12256 (diff)
downloadCMake-52c95540b722926ba833ead05a575189bdabf84e.zip
CMake-52c95540b722926ba833ead05a575189bdabf84e.tar.gz
CMake-52c95540b722926ba833ead05a575189bdabf84e.tar.bz2
target_*: Fix cross-directory call backtraces
Record the call-site backtrace, not the current backtrace of the target's directory. Fixes: #23873
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json58
1 files changed, 11 insertions, 47 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
index 799c21e..12ec917 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json
@@ -13,25 +13,13 @@
"compileGroupLanguage": "C",
"backtrace": [
{
- "file": "^codemodel-v2\\.cmake$",
- "line": 18,
- "command": "add_subdirectory",
- "hasParent": true
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": null,
- "command": null,
- "hasParent": true
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
+ "file": "^subdir/CMakeLists\\.txt$",
+ "line": 4,
+ "command": "target_sources",
"hasParent": true
},
{
- "file": "^CMakeLists\\.txt$",
+ "file": "^subdir/CMakeLists\\.txt$",
"line": null,
"command": null,
"hasParent": false
@@ -78,25 +66,13 @@
"define": "SUBDIR",
"backtrace": [
{
- "file": "^codemodel-v2\\.cmake$",
- "line": 18,
- "command": "add_subdirectory",
+ "file": "^subdir/CMakeLists\\.txt$",
+ "line": 1,
+ "command": "target_compile_definitions",
"hasParent": true
},
{
- "file": "^codemodel-v2\\.cmake$",
- "line": null,
- "command": null,
- "hasParent": true
- },
- {
- "file": "^CMakeLists\\.txt$",
- "line": 3,
- "command": "include",
- "hasParent": true
- },
- {
- "file": "^CMakeLists\\.txt$",
+ "file": "^subdir/CMakeLists\\.txt$",
"line": null,
"command": null,
"hasParent": false
@@ -153,25 +129,13 @@
"id": "^c_lib::@6890427a1f51a3e7e1df$",
"backtrace": [
{
- "file": "^codemodel-v2\\.cmake$",
- "line": 18,
- "command": "add_subdirectory",
- "hasParent": true
- },
- {
- "file": "^codemodel-v2\\.cmake$",
- "line": null,
- "command": null,
- "hasParent": true
- },
- {
- "file": "^CMakeLists\\.txt$",
+ "file": "^subdir/CMakeLists\\.txt$",
"line": 3,
- "command": "include",
+ "command": "target_link_libraries",
"hasParent": true
},
{
- "file": "^CMakeLists\\.txt$",
+ "file": "^subdir/CMakeLists\\.txt$",
"line": null,
"command": null,
"hasParent": false