Commit b8259c3d (Centralize maintenance of usage requirement include
directories, 2013-04-29) changed the handling of the property.
Previously setting the property directly instead of via
target_link_libraries would not result in transitive include
directory handling.
We can do this check only if the TargetName is non-empty, which means
that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked
dependency which was set using target_link_libraries.
It is possible to have relative paths in INCLUDE_DIRECTORIES already
in CMake 2.8.10.2, so that part will require a policy to fix.
It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains
a directory which does not exist, which indicates a programmer error
by the upstream, or a packaging error.
One of the RunCMake.CompatibleInterface tests also needs to be updated
due to this change. Non-existant includes were used in the test, but
are not needed.
Check that source and binary directories are not part of the
INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets.
This is limited to directories which do not contain generator
expressions to evaluate. Such paths can only be checked at time
of use of the imported target, which will be done in a follow up
patch.
This is a partial revert of commit 77cecb77 (Add includes and compile
definitions with target_link_libraries., 2012-11-05).
As the interface includes and defines are now determined by the link
closure, there is no need to populate the corresponding properties
explicitly.
Otherwise, we get a separate IncludeDirectoriesEntry for each include,
and that causes unnecessary and confusing splitting in the output when
debugging the INCLUDE_DIRECTORIES property.
This fixes a regression introduced in commit 290e92ad (Move
GetIncludeDirectories to cmGeneratorTarget, 2012-09-16) which loops over
cmGeneratorTargets before they get created, so the container is empty.