How to find current INTERFACE library property whitelist?

I have a project where instead of meddling with global state for cleanness sake I inherit a common set of target properties via an INTERFACE library, including C_EXTENSIONS and CXX_EXTENSIONS, however I get the

CMake Error at CMakeLists.txt:52 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "C_EXTENSIONS" is not allowed.

error on CMake 3.8. I would like to find out what the current whitelist of properties are on any given CMake version without having to download every version from 3.8-3.22 and give it a spin. (This question is going to arise in the future as well.) I would like to know what the impact of this facility is towards raising the minimum version requirement.

I looked inside the docs and all of the release notes, but these changes aren’t documented, however they do work with 3.22, so somewhere in between 3.8-3.22 there’s a change.

Before CMake 3.19 almost only INTERFACE_ prefixed properties were allowed.
It’s documented in https://cmake.org/cmake/help/v3.18/manual/cmake-buildsystem.7.html#interface-libraries The documentation seems to be removed completely, as there are no more restrictions.

But I don’t think this will really help you.
I think properties like C_EXTENSION only apply on the target where specified and are not inherited from interfaces. Only those documented and starting with INTERFACE_ usually will.

1 Like