Skip to content

Commit c2974e2

Browse files
tejlmandfabiobaltieri
authored andcommitted
cmake: test format options together
Fixes: #47588 Use `check_set_compiler_property(... "SHELL:-Wformat -W<format-option>")` to ensure that compiler options requiring `-Wformat` to work properly are tested with said option. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent c32e4a7 commit c2974e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmake/compiler/gcc/compiler_flags.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ set_compiler_property(PROPERTY optimization_size -Os)
2828
# GCC Option standard warning base in Zephyr
2929
check_set_compiler_property(PROPERTY warning_base
3030
-Wall
31-
-Wformat
32-
-Wformat-security
33-
-Wno-format-zero-length
31+
"SHELL:-Wformat -Wformat-security"
32+
"SHELL:-Wformat -Wno-format-zero-length"
3433
-Wno-main
3534
)
3635

0 commit comments

Comments
 (0)