zephyr/cmake
Torsten Rasmussen 6ca2bf25cb cmake: manual handling of CMakeCheckCompilerFlag.cmake inclusion
Fixes: #30232

This is a workaround for #30232.

During Zephyr CMake invocation a plain C compiler is used for DTS.
This results in the internal `CheckCompilerFlag.cmake` being included
by CMake

Later, when the full toolchain is configured, then
`CMakeCheckCompilerFlag.cmake` is included.
This overloads the `cmake_check_compiler_flag()` function, thus
causing #30232.

By manualy loading `CMakeCheckCompilerFlag.cmake` then
`CheckCompilerFlag.cmake` will overload the functions (and thus win the
battle), and because `include_guard(GLOBAL)` is used in
`CMakeCheckCompilerFlag.cmake` this file will not be re-included later.

It also prints a warning informing the user of the issue.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-12-01 08:46:41 -06:00
..
app cmake: manual handling of CMakeCheckCompilerFlag.cmake inclusion 2020-12-01 08:46:41 -06:00
bintools bintools: append ; to > to ensure a space 2020-11-26 14:20:03 +01:00
compiler cmake: Added SPARC support 2020-11-13 14:53:55 -08:00
emu sanitycheck: Add TSIM3 support 2020-11-13 14:53:55 -08:00
flash cmake: flash signed binaries for mcuboot 2020-09-03 16:49:09 -05:00
ide
linker cmake: extend target_ld_options() to support grouping of flags 2020-10-27 13:09:02 +01:00
makefile_exports cmake: export build flags to external build systems excluding SHELL tag 2020-09-10 11:31:53 +02:00
reports scripts: size_report: Fix colorized output 2020-09-03 09:54:21 -04:00
toolchain cmake: Preparation for SDK 0.12 and SPARC 2020-11-19 16:57:37 -05:00
usage cmake: sort shield list and improve indent 2020-08-05 12:01:49 +02:00
util
boards.cmake doc,cmake: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
ccache.cmake
cfb.cmake
dts.cmake cmake: dts: getting realpath for system includes for dts. 2020-10-27 16:40:19 +01:00
extensions.cmake cmake: extend target_ld_options() to support grouping of flags 2020-10-27 13:09:02 +01:00
extra_flags.cmake
gcc-m-cpu.cmake cmake: gcc: add support for compiling for the ARM Cortex-M1 2020-08-14 13:35:39 -05:00
generic_toolchain.cmake cmake: Ignore LDFLAGS and AFLAGS from environment 2020-09-10 15:35:50 -05:00
git.cmake
hex.cmake
host-tools.cmake cmake: add IMGTOOL optional dependency 2020-09-01 13:33:46 +02:00
kconfig.cmake cmake: ensure shields can be placed in other BOARD_ROOTs 2020-11-13 13:36:48 +01:00
kobj.cmake
mcuboot.cmake cmake: mcuboot: confirmed images needs to be padded 2020-09-04 12:00:04 +02:00
pristine.cmake
python.cmake cmake: find python3 on windows when multiarch are installed 2020-05-13 12:13:36 +02:00
target_toolchain.cmake cmake: toolchain: Toolchain abstraction templates 2020-09-04 20:36:59 +02:00
target_toolchain_flags.cmake cmake: toolchain: Toolchain abstraction templates 2020-09-04 20:36:59 +02:00
version.cmake
west.cmake cmake: add WEST to cached variable 2020-09-03 17:32:48 -04:00
zephyr_module.cmake cmake: Zephyr module error on module name current 2020-08-31 12:15:02 +02:00