diff options
author | Brad King <brad.king@kitware.com> | 2019-09-20 14:21:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-20 14:22:01 (GMT) |
commit | 4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e (patch) | |
tree | a91134d134b2e95e3650e756613a954285cdaabd /Tests | |
parent | 3c060ae6ca01464d507d6c7b6cef38639084418f (diff) | |
parent | 4d6334824d81086af205fe06b6fc4c4fda5224b4 (diff) | |
download | CMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.zip CMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.tar.gz CMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.tar.bz2 |
Merge topic 'fileapiLinkPathAndLinkDirBacktraces'
4d6334824d fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIES
5bd65dff7a cmLocalGenerator: Add OutputLinkLibraries overload with backtraces
5d39e792ae cmGeneratorTarget: Store backtrace for target LINK_DIRECTORIES property
7da17ef797 cmLinkLineComputer: Add ComputeLinkLibraries overload with backtraces
d4d0dd0f6a cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces
0ac9dcb807 cmLinkLineComputer: Add ComputeLinkPath overload with backtraces
0c6468178a cmComputeLinkInformation: Add GetDirectoriesWithBacktraces
a209b31d0d cmComputeLinkInformation: Add AppendValues with backtraces
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3805
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-check.py | 40 | ||||
-rw-r--r-- | Tests/RunCMake/FileAPI/cxx/CMakeLists.txt | 1 |
2 files changed, 39 insertions, 2 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index 2a24421..52934f2 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -249,13 +249,13 @@ def check_target(c): if expected["backtrace"] is not None: expected_keys.append("backtrace") - assert actual["fragment"] == expected["fragment"] + assert matches(actual["fragment"], expected["fragment"]) assert actual["role"] == expected["role"] check_backtrace(obj, actual["backtrace"], expected["backtrace"]) assert sorted(actual.keys()) == sorted(expected_keys) - check_list_match(lambda a, e: is_string(a["fragment"], e["fragment"]), + check_list_match(lambda a, e: matches(a["fragment"], e["fragment"]), obj["link"]["commandFragments"], expected["link"]["commandFragments"], check=check_link_command_fragments, check_exception=lambda a, e: "Link fragment: %s" % a["fragment"], @@ -2218,6 +2218,42 @@ def gen_check_targets(c, g, inSource): }, ], }, + { + "fragment" : ".*TargetLinkDir\\\"?$", + "role" : "libraryPath", + "backtrace": [ + { + "file": "^cxx/CMakeLists\\.txt$", + "line": 19, + "command": "target_link_directories", + "hasParent": True, + }, + { + "file" : "^cxx/CMakeLists\\.txt$", + "line": None, + "command": None, + "hasParent": False, + }, + ], + }, + { + "fragment" : ".*cxx_lib.*", + "role" : "libraries", + "backtrace": [ + { + "file": "^cxx/CMakeLists\\.txt$", + "line": 6, + "command": "target_link_libraries", + "hasParent": True, + }, + { + "file" : "^cxx/CMakeLists\\.txt$", + "line": None, + "command": None, + "hasParent": False, + }, + ], + }, ], }, "archive": None, diff --git a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt index 17ff455..b0564f5 100644 --- a/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt +++ b/Tests/RunCMake/FileAPI/cxx/CMakeLists.txt @@ -16,3 +16,4 @@ target_link_libraries(cxx_static_exe PRIVATE cxx_static_lib) target_compile_options(cxx_exe PUBLIC TargetCompileOptions) target_link_options(cxx_exe PUBLIC TargetLinkOptions) +target_link_directories(cxx_exe PUBLIC "${CMAKE_BINARY_DIR}/TargetLinkDir") |