rapids_cmake_make_global

Added in version v21.06.00.

Make sure all provided targets have global visibility no matter how they are constructed.

rapids_cmake_make_global(target_var)

CMake targets have visibility or scope where they can be referenced by name. Any built-in target such as those created by add_library have global visibility. Targets created with add_library(IMPORTED) by default have directory visibility. This causes problems when trying to reason about targets created by CPM, as they could be either of the above.

This function promotes the set of targets provided to have global visibility. This makes it easier for users to reason about when/where they can reference the targets.

target_var

Holds the variable that lists all targets that should be promoted to GLOBAL scope