zephyr/cmake/linker/ld
Torsten Rasmussen b94ce67899 cmake: get Zephyr settings for language extension
This commit updates the get Zephyr settings functions to be able to
handle settings if those settings are expressed using a generator
expression.

As example, zephyr_get_include_directories_for_lang(...) would prefix
each include property of zephyr_interface with `-I`, like this:
Property: include;include/generated;lib/libc/minimal/include
becomes: `-Iinclude -Iinclude/generated -Ilib/libc/minimal/include`

But if the property contains a generator expression:
Property: include;$<TARGET_PROPERTY:compiler,some_include>
becomes: -Iinclude -I$<TARGET_PROPERTY:compiler,some_include>
and in case that property is a list, this results in:
`-Iinclude -Iinclude/list_item1;include/list_item2;include/list_itemN`
and thus breaking the build.

This is fixed by using `$<JOIN:<list>>` expression instead, which
ensures all list item, regardless of provided as simple list or through
the usage another generator expression, will always expand correctly.

Functions updated in the commit:
- zephyr_get_include_directories_for_lang
- zephyr_get_system_include_directories_for_lang
- zephyr_get_compile_definitions_for_lang
- zephyr_get_compile_options_for_lang

The sample `application_development/external_lib` has been updated
according to those changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-04 20:36:59 +02:00
..
clang toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
gcc toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
host-gcc toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
linker_flags.cmake toolchain: improved toolchain abstraction for compilers and linker 2020-09-04 20:36:59 +02:00
target.cmake cmake: get Zephyr settings for language extension 2020-09-04 20:36:59 +02:00
target_baremetal.cmake docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
target_base.cmake cmake: Toolchain abstraction: move PROPERTY_LINKER_SCRIPT_DEFINES 2019-05-07 22:17:29 -04:00
target_configure.cmake cmake: using ${ZEPHYR_BASE} instead of $ENV{ZEPHYR_BASE} 2020-03-27 16:23:46 +01:00
target_cpp.cmake cmake: Use zephyr_link_libraries in toolchain_ld_cpp. 2019-11-07 16:37:50 +01:00
target_relocation.cmake target_relocation.cmake: fix spell typo 2019-07-18 11:09:48 -04:00