[CMake] Why does INTERFACE type targets only support whitelisted properties?

Yves Frederix yves.frederix+cmake at gmail.com
Fri Jan 8 05:22:13 EST 2016


Hi all,

Motivated by my own struggles with targets of type INTERFACE and a
recent post on this list, I was wondering what is the rationale behind
allowing only a whitelisted set of properties on targets of this type.
I understand that one of the use cases for INTERFACE libraries is to
have a way to work with header-only libraries in a more or less
standard way. Yes, the current implementation is far from optimal on
more than one aspect, but I never understood the reason for the
whitelisting (also google didn't make me any wiser). What am I
missing? Wouldn't INTERFACE targets be easier to use without these
restrictions (or alternatively by switching to blacklisting of some
properties to protect a user from having wrong expectations)?

Thanks!
Yves


More information about the CMake mailing list