diff options
author | Brad King <brad.king@kitware.com> | 2022-08-22 15:40:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-22 18:51:16 (GMT) |
commit | 0d64c3abd13a0b14f1a14b7717dbac8988d12256 (patch) | |
tree | c925eb0e3a51350002d4e0ca294db5e5f39d431b /Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json | |
parent | ef6a4240babe28fdb7f678288aade9f962b7ec11 (diff) | |
download | CMake-0d64c3abd13a0b14f1a14b7717dbac8988d12256.zip CMake-0d64c3abd13a0b14f1a14b7717dbac8988d12256.tar.gz CMake-0d64c3abd13a0b14f1a14b7717dbac8988d12256.tar.bz2 |
Tests: Add FileAPI case for cross-directory target_* commands
The backtraces for some of the commands incorrectly come from the
target's directory instead of the caller's directory. Expect the
incorrect backtraces in test results for now.
Increase the minimum required version of CMake in the test case
to enable policy CMP0079 to support cross-directory calls.
Issue: #23873
Diffstat (limited to 'Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json | 186 |
1 files changed, 186 insertions, 0 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 new file mode 100644 index 0000000..799c21e --- /dev/null +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/targets/c_subdir.json @@ -0,0 +1,186 @@ +{ + "name": "c_subdir", + "id": "^c_subdir::@6890427a1f51a3e7e1df$", + "directorySource": "^\\.$", + "projectName": "codemodel-v2", + "type": "STATIC_LIBRARY", + "isGeneratorProvided": null, + "sources": [ + { + "path": "^subdir/empty\\.c$", + "isGenerated": null, + "sourceGroupName": "Source Files", + "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", + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + } + ], + "sourceGroups": [ + { + "name": "Source Files", + "sourcePaths": [ + "^subdir/empty\\.c$" + ] + } + ], + "compileGroups": [ + { + "language": "C", + "sourcePaths": [ + "^subdir/empty\\.c$" + ], + "includes": [ + { + "path": "^.*/Tests/RunCMake/FileAPI/subdir$", + "isSystem": null, + "backtrace": [ + { + "file": "^subdir/CMakeLists\\.txt$", + "line": 2, + "command": "target_include_directories", + "hasParent": true + }, + { + "file": "^subdir/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + } + ], + "defines": [ + { + "define": "SUBDIR", + "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", + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + } + ], + "compileCommandFragments": null + } + ], + "backtrace": [ + { + "file": "^codemodel-v2\\.cmake$", + "line": 17, + "command": "add_library", + "hasParent": true + }, + { + "file": "^codemodel-v2\\.cmake$", + "line": null, + "command": null, + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": 3, + "command": "include", + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ], + "folder": null, + "nameOnDisk": "^(lib)?c_subdir\\.(a|lib)$", + "artifacts": [ + { + "path": "^((Debug|Release|RelWithDebInfo|MinSizeRel)/)?(lib)?c_subdir\\.(a|lib)$", + "_dllExtra": false + } + ], + "build": "^\\.$", + "source": "^\\.$", + "install": null, + "link": null, + "archive": { + "lto": null + }, + "dependencies": [ + { + "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$", + "line": 3, + "command": "include", + "hasParent": true + }, + { + "file": "^CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + }, + { + "id": "^ZERO_CHECK::@6890427a1f51a3e7e1df$", + "backtrace": null + } + ] +} |