cmTarget: refactor and simplify visibility
C++ modules are going to introduce a third concept of "synthesized" targets, so update logic where needed to avoid assuming "not imported? must be normal".
Store the visibility as an enum class
rather than a collection of bool
variables and use query methods to inspect its state.
A base for C++ module support from IMPORTED
targets. Factored out to minimize the MR review of the final feature, so this doesn't really do much at the moment.
Edited by Ben Boeckel