Use --sysroot when cross compiling.

As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
introduced, which is never a list.

The contents of this variable is passed to supporting compilers
as --sysroot. It is also accounted for when processing implicit
link directories reported by the compiler, and when generating
RPATH information.
Add missing 'seen' check for evaluating COMPILE_OPTIONS.

Commit 089fe1c1 (Optimize genex evaluation for includes and
defines., 2013-02-01) introduced an optimization on DAG processing
to not reprocess properties on targets which have already been seen.

This was refactored slightly in commit 8dfdf1c7 (Fix the tests for
evaluating includes and defines., 2013-02-18), but was not extended
to cover COMPILE_OPTIONS in commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).

This omission causes the same performance regression in running
cmake on LLVM which 089fe1c1 fixed before, but this time for the
transitive evaluation of the COMPILE_OPTIONS property.
Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.

This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).
Use a preprocessor loop to manage the valid transitive properties.

Hopefully this will prevent regressions when adding further transitive
properties in the future.
QtAutomoc: Fix handling of list separator for compile definitions.
QtAutomoc: Use config-dependent compile definitions and includes.

Instead of always using the includes and defines which are not
config-specific, ensure that the config specific ones can be used.

Task-number: #13589
Merge topic 'set-sysroot'

de4da66 Use --sysroot when cross compiling.
Merge topic 'fix-COMPILE_OPTIONS-transitive-performance-regression'

477e413 Add missing 'seen' check for evaluating COMPILE_OPTIONS.
Merge topic 'find-targets-in-INTERFACE_COMPILE_OPTIONS'

8a3b5be Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
Merge topic 'transitive-property-PP-FOR_EACH'

0d8db25 Use a preprocessor loop to manage the valid transitive properties.
Merge topic 'config-dependent-CMAKE_AUTOMOC'

ea4d784 QtAutomoc: Use config-dependent compile definitions and includes.
67f6ceb QtAutomoc: Fix handling of list separator for compile definitions.