Adding alias to non-global imported target fails silently
add_library(l SHARED IMPORTED) add_library(al ALIAS l) if (TARGET al) message(STATUS "al is target") endif()
The alias target is not created, as it is expected from the documentation, but the
add_library(... ALIAS ...) call fails silently, and that is not desirable. Please make it print out a diagnostic message, as an attempt to alias an alias does.