The include_directories() and add_compile_options() commands
should not append to the corresponding target property for IMPORTED
targets. This is already the case for add_definitions().
Treat paths which are relative and which contain a generator
expression which is not at the beginning as relative to the
source directory.
This matches the behavior of paths which are relative but contain
no generator expression at all.
Previously this would generate a relative path with the IMPORTED
target on export(), which would be a reported as a non-existent
path on import. If used directly in the buildsystem, it would be
reported as a relative path, which is also an error. There is no
need for a policy in this case.
Change the unit test introduced in commit 24dcf0c0 (Make sure
generator expressions can be used with target_include_directories.,
2013-01-16) to not use the expression, but still test the appropriate
code.
This is both a short form of using a TARGET_DEFINED expression
together with a TARGET_PROPERTY definition, and a way to strip
non-target content from interface properties when exporting.
With similar reasoning to the parent commit, as downstreams, we can't
determine what $<CONFIG> generator expressions would be appropriate.
Upstream would have populated the INTERFACE_INCLUDE_DIRECTORIES with
config-specific generator expressions, possibly appropriate for
their DEBUG_CONFIGURATIONS. In theory, if we would add include
directories for a DEBUG intent, we would have to match the upstream
configurations for that.
Rather than attempting to discover the appropriate configurations
at this time, simplify the feature instead. The use of IMPORTED targets
with these commands could still be added in the future if targets
would export their DEBUG_CONFIGURATIONS somehow.