Skip to content

Commit f3e3ced

Browse files
fabiobaltieritejlmand
authored andcommitted
[nrf fromtree] cmake: use the warnings_as_errors flag for cpp files
C++ file compilation is actually missing the warning-as-error handling, causing warnings in build files to be unnoticed in CI. Add a flag to handle them as well. Signed-off-by: Fabio Baltieri <[email protected]> (cherry picked from commit 56dcafe)
1 parent ea7e265 commit f3e3ced

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler-cpp,
152152
# Extra warnings options for twister run
153153
if (CONFIG_COMPILER_WARNINGS_AS_ERRORS)
154154
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,warnings_as_errors>>)
155+
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler,warnings_as_errors>>)
155156
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:$<TARGET_PROPERTY:asm,warnings_as_errors>>)
156157
zephyr_link_libraries($<TARGET_PROPERTY:linker,warnings_as_errors>)
157158
endif()

0 commit comments

Comments
 (0)