diff options
author | Brad King <brad.king@kitware.com> | 2021-06-01 12:42:08 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-06-01 12:42:16 (GMT) |
commit | 02957bb58906bcb769410b6d4938dbdbfcacb78f (patch) | |
tree | 4d82f0744daedfb77cc13952663bc3aefed907da /Tests/RunCMake | |
parent | 5eb2aa1f57e99f30be5ea145ce9af5fd9652392f (diff) | |
parent | f7ba3a05893279f6704db15358b08fd4ecb28814 (diff) | |
download | CMake-02957bb58906bcb769410b6d4938dbdbfcacb78f.zip CMake-02957bb58906bcb769410b6d4938dbdbfcacb78f.tar.gz CMake-02957bb58906bcb769410b6d4938dbdbfcacb78f.tar.bz2 |
Merge topic 'install-imported-runtime-artifacts'
f7ba3a0589 FileAPI: Populate information for IMPORTED_RUNTIME_ARTIFACTS
df7040a271 install(): Add IMPORTED_RUNTIME_ARTIFACTS mode
60e752ced8 Refactor: Move common methods into cmInstallGenerator
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6162
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-check.py | 2 | ||||
-rw-r--r-- | Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json | 65 | ||||
-rw-r--r-- | Tests/RunCMake/FileAPI/imported/CMakeLists.txt | 7 |
3 files changed, 71 insertions, 3 deletions
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py index b9a1fbf..9911ad5 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py +++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py @@ -644,7 +644,7 @@ def gen_check_directories(c, g): if sys.platform not in ("win32", "cygwin", "msys"): for e in expected: - e["installers"] = list(filter(lambda i: "_dllExtra" not in i or not i["_dllExtra"], e["installers"])) + e["installers"] = list(filter(lambda i: not i.get("_dllExtra", False), e["installers"])) if "aix" not in sys.platform: for i in e["installers"]: if "pathsNamelink" in i: diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json index d127274..92b9526 100644 --- a/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json +++ b/Tests/RunCMake/FileAPI/codemodel-v2-data/directories/imported.json @@ -14,6 +14,67 @@ ], "projectName": "Imported", "minimumCMakeVersion": "3.12", - "hasInstallRule": null, - "installers": [] + "hasInstallRule": true, + "installers": [ + { + "component": "Unspecified", + "type": "importedRuntimeArtifacts", + "destination": "lib", + "paths": null, + "isExcludeFromAll": null, + "isForAllComponents": null, + "isOptional": null, + "targetId": null, + "targetIndex": null, + "targetIsImportLibrary": null, + "targetInstallNamelink": null, + "exportName": null, + "exportTargets": null, + "scriptFile": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 32, + "command": "install", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + }, + { + "component": "Unspecified", + "type": "importedRuntimeArtifacts", + "destination": "lib2", + "paths": null, + "isExcludeFromAll": null, + "isForAllComponents": null, + "isOptional": true, + "targetId": null, + "targetIndex": null, + "targetIsImportLibrary": null, + "targetInstallNamelink": null, + "exportName": null, + "exportTargets": null, + "scriptFile": null, + "backtrace": [ + { + "file": "^imported/CMakeLists\\.txt$", + "line": 35, + "command": "install", + "hasParent": true + }, + { + "file": "^imported/CMakeLists\\.txt$", + "line": null, + "command": null, + "hasParent": false + } + ] + } + ] } diff --git a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt index f79d87c..770838b 100644 --- a/Tests/RunCMake/FileAPI/imported/CMakeLists.txt +++ b/Tests/RunCMake/FileAPI/imported/CMakeLists.txt @@ -28,3 +28,10 @@ endif() add_library(imported_interface_lib INTERFACE IMPORTED) add_executable(link_imported_interface_exe ../empty.c) target_link_libraries(link_imported_interface_exe PRIVATE imported_interface_lib) + +install(IMPORTED_RUNTIME_ARTIFACTS imported_shared_lib + DESTINATION lib +) +install(IMPORTED_RUNTIME_ARTIFACTS imported_shared_lib + DESTINATION lib2 OPTIONAL +) |