zephyr/cmake/target_toolchain_flags.cmake
Torsten Rasmussen 31a1411cbd cmake: toolchain: Toolchain abstraction templates
As part of toolchain abstraction three template files to facilitate
additional toolchain support development has been introduced.

Those covers:
- bintools
- compiler flags
- linker flags

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-09-04 20:36:59 +02:00

18 lines
746 B
CMake

# Custom targets for compiler and linker flags.
add_custom_target(asm)
add_custom_target(compiler)
add_custom_target(compiler-cpp)
add_custom_target(linker)
# Loading of templates are strictly not needed as they does not set any
# properties.
# They purely provides an overview as well as a starting point for supporting
# a new toolchain.
include(${CMAKE_CURRENT_LIST_DIR}/compiler/compiler_flags_template.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/linker/linker_flags_template.cmake)
# Configure the toolchain flags based on what toolchain technology is used
# (gcc, host-gcc etc.)
include(${TOOLCHAIN_ROOT}/cmake/compiler/${COMPILER}/compiler_flags.cmake OPTIONAL)
include(${TOOLCHAIN_ROOT}/cmake/linker/${LINKER}/linker_flags.cmake OPTIONAL)