For CMake 3.21, we are adding support for RUNTIME_DEPENDENCY_SET
and RUNTIME_DEPENDENCIES
keywords to install(TARGETS)
, but only RUNTIME_DEPENDENCY_SET
for the new install(IMPORTED_RUNTIME_ARTIFACTS)
subcommand. Should the latter command also support a RUNTIME_DEPENDENCIES
keyword for consistency?
Cc: @kyle.edwards
RUNTIME_DEPENDENCIES
is just a shortcut to create an anonymous RUNTIME_DEPENDENCY_SET
. install(TARGETS)
gets used a lot more frequently than install(IMPORTED_RUNTIME_ARTIFACTS)
, and so I think it’s more deserving of its own shortcut.
If there’s enough demand for RUNTIME_DEPENDENCIES
with install(IMPORTED_RUNTIME_ARTIFACTS)
, we could consider adding it.
I get that, but my comments were intended to highlight an inconsistency in a new API. We have an opportunity to not create that inconsistency from the outset. In getting myself up to speed on these features, it was something that as a user I noticed relatively early. It didn’t make sense (again, to me as a user) why RUNTIME_DEPENDENCIES
was supported for one and not the other. I found myself leaning toward basically ignoring RUNTIME_DEPENDENCIES
and just focusing on learning how to use RUNTIME_DEPENDENCY_SET
because I know that will work for both subcommands. We shouldn’t be placing such obstacles on the learning path for users exploring these new features if we can avoid it.