Skip to content

Commit 7df004e

Browse files
tejlmandkartben
authored andcommitted
cmake: treat warnings as errors for assembly stage
CONFIG_COMPILER_WARNINGS_AS_ERRORS=y promotes compiler warnings to errors. However, on GCC warnings generated by the assembler during the assembly step requires `-Wa,--fatal-warnings` in order to be correctly treated as errors. Specify `-Wa,--fatal-warnings` in addition to `-Werror` for GCC. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 052ded1 commit 7df004e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/compiler/gcc/compiler_flags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ set_property(TARGET compiler-cpp PROPERTY dialect_cpp23 "-std=c++23"
153153
set_compiler_property(PROPERTY no_strict_aliasing -fno-strict-aliasing)
154154

155155
# Extra warning options
156-
set_property(TARGET compiler PROPERTY warnings_as_errors -Werror)
156+
set_property(TARGET compiler PROPERTY warnings_as_errors -Werror -Wa,--fatal-warnings)
157157
set_property(TARGET asm PROPERTY warnings_as_errors -Werror -Wa,--fatal-warnings)
158158

159159
# Deprecation warning

0 commit comments

Comments
 (0)