CMake Nightly Date Stamp
target_include_directories: Allow relative path with genex

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.
Fix some exported include dir behavior.

In some places, the behavior of CMake when it finds an
INTERFACE_INCLUDE_DIRECTORIES entry which contains a genex is not
correct. In some cases it should be checking whether the entry
starts with a genex, rather than contains a genex at any position.

The

 install(... INCLUDES DESTINATION)

calls exavluate the generator expressions at export-time, so it is
fully determined whether they contain absolute or relative paths.
In this case, relative paths are always treated relative to the
$<INSTALL_PREFIX>.

Relative entries within $<INSTALL_INTERFACE:...>, when used in contexts
other than 'INCLUDES DESTINATION', are treated relative to
the $<INSTALL_PREFIX>, unless they start with a generator expression.

Relative paths set through set_property are treated as relative (with
an error diagnosis), even if they contain a generator expression. However,
using a generator expression at the start of the entry is not an error
in this case.

Relative paths set through target_include_directories are treated as
relative to the source directory, if they are not wrapped
in $<INSTALL_INTERFACE>, if they contain a generator expression which
is not at the start. This requires an error diagnosis.
install: Process relative includes after genex evaluation.

In code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<FOO>include
 )

the generator expressions are evaluated at generate-time. Delay
determining whether each entry is a relative path until after
the generator expressions are evaluated. Such relative paths
are based relative to the CMAKE_INSTALL_PREFIX.
install: Process INSTALL_INTERFACE in INCLUDES DESTINATION.

Code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
 )

should behave as if the INSTALL_INTERFACE wrapper were not present.
export: Prefix relative items with genexes in INSTALL_INTERFACE.

Code such as

 target_include_directories(foo INTERFACE
   $<INSTALL_INTERFACE:include$<FOO>>
 )

should be treated as a relative directory, despite the genex, after
the INSTALL_INTERFACE is stripped away.

Previously, this would generate a relative directory on export, which
would be an error on import, so no policy is needed.
Name python module according to swig flags.
Merge topic 'UseSWIG-fix13318' into next

6dfa23d Name python module according to swig flags.
Export: Report error on relative include with genex.

Diagnostics which check the sanity of exported include paths
previously skipped over any path containing a generator expression.

Introduce a policy to issue an error message in such cases.

The export files created in the OLD behavior are not usable, because
they contain relative paths or paths to the source or build location
which are not suitable for use on installation. CMake will report an
error on import.
Merge topic 'export-includes' into next

8788629 Export: Report error on relative include with genex.
0599e94 export: Prefix relative items with genexes in INSTALL_INTERFACE.
1dbda30 install: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
b37a607 install: Process relative includes after genex evaluation.
91c0466 Fix some exported include dir behavior.
38afc82 target_include_directories: Allow relative path with genex
Export the INTERFACE_AUTOUIC_OPTIONS.
Merge topic 'INTERFACE_AUTOUIC_OPTIONS' into next

89f76ad Export the INTERFACE_AUTOUIC_OPTIONS.
Help: Fix typo in genex docs.

would be require -> would require
Help: Fix typo in CMP0040 docs.

'report and error' -> 'report an error'
Merge topic 'minor-cleanups' into next

ebeb31d Help: Fix typo in CMP0040 docs.
97b0abb Help: Fix typo in genex docs.
b472785 CMake Nightly Date Stamp
Export: Test existing behavior of exporting includes with genexes.

Test that no warning or error diagnostic is issued for 'good code'.
Export: Process relative includes after genex evaluation.

In code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<FOO>include
 )

the generator expressions are evaluated at generate-time. Delay
determining whether each entry is a relative path until after
the generator expressions are evaluated. Such relative paths
are based relative to the CMAKE_INSTALL_PREFIX.
Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.

Code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
 )

should behave as if the INSTALL_INTERFACE wrapper were not present.
Export: Prefix relative items with genexes in INSTALL_INTERFACE.

Code such as

 target_include_directories(foo INTERFACE
   $<INSTALL_INTERFACE:include$<FOO>>
 )

should be treated as a relative directory, despite the genex, after
the INSTALL_INTERFACE is stripped away.

Previously, this would generate a relative directory on export, which
would be an error on import, so no policy is needed.
Export: Report error on relative include with genex.

Diagnostics which check the sanity of exported include paths
previously skipped over any path containing a generator expression.

Introduce a policy to issue an error message in such cases.

The export files created in the OLD behavior are not usable, because
they contain relative paths or paths to the source or build location
which are not suitable for use on installation. CMake will report an
error on import.