Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: manual handling of CMakeCheckCompilerFlag.cmake inclusion
Fixes: zephyrproject-rtos#30232 This is a workaround for zephyrproject-rtos#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 zephyrproject-rtos#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 <[email protected]>
- Loading branch information