Skip to content

Fix relationship of NO_SYSTEM_FROM_IMPORTED and INTERFACE libraries

Brad King requested to merge brad.king/cmake:imported-interface-no-system into master

The change in !270 (merged) was incorrect. The property is not meant to be set on imported targets at all. It is meant to be set on their consumers that compile sources. Since INTERFACE libraries have no sources to compile, the property is not needed on them.

Revert most of that change and clarify the documentation. Unfortunately we must still tolerate project code setting NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries because they were allowed by CMake 3.8 and 3.9.

Fixes: #17348 (closed)

Merge request reports