Skip to content

Commit 4b415df

Browse files
thugheskartben
authored andcommitted
cmake: modules: Refer to log file based on CMake version
Starting with cmake 3.26, the log file used for configure-time checks has changed: https://cmake.org/cmake/help/latest/release/3.26.html#configure-log Signed-off-by: Tom Hughes <[email protected]>
1 parent c925b0e commit 4b415df

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/modules/kernel.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,12 @@ enable_language(ASM)
142142
# Verify that the toolchain can compile a dummy file, if it is not we
143143
# won't be able to test for compatibility with certain C flags.
144144
zephyr_check_compiler_flag(C "" toolchain_is_ok)
145+
set(log_file "CMakeConfigureLog.yaml")
146+
if(CMAKE_VERSION VERSION_LESS "3.26.0")
147+
set(log_file "CMakeError.log")
148+
endif()
145149
assert(toolchain_is_ok "The toolchain is unable to build a dummy C file.\
146-
Move ${USER_CACHE_DIR}, re-run and look at CMakeError.log")
150+
Move ${USER_CACHE_DIR}, re-run and look at ${log_file}")
147151

148152
include(${ZEPHYR_BASE}/cmake/target_toolchain_flags.cmake)
149153

0 commit comments

Comments
 (0)