Skip to content

Commit 56dcafe

Browse files
fabiobaltierinashif
authored andcommitted
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 <fabiobaltieri@google.com>
1 parent 1a2d74a commit 56dcafe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

+1
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)