Skip to content

Commit dc93609

Browse files
committed
cmake: clang: Override -Wno-volatile with -Wno-deprecated-volatile
Override the GCC-specific `-Wno-volatile` flag specified by GCC `compiler_flags.cmake` with the Clang-equivalent `-Wno-deprecated-volatile`. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 6f5906b commit dc93609

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/compiler/clang/compiler_flags.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ include(${ZEPHYR_BASE}/cmake/compiler/gcc/compiler_flags.cmake)
33

44
# Now, let's overwrite the flags that are different in clang.
55

6+
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a "-std=c++2a"
7+
"-Wno-register" "-Wno-deprecated-volatile")
8+
set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "-std=c++20"
9+
"-Wno-register" "-Wno-deprecated-volatile")
10+
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "-std=c++2b"
11+
"-Wno-register" "-Wno-deprecated-volatile")
12+
set_property(TARGET compiler-cpp PROPERTY dialect_cpp23 "-std=c++23"
13+
"-Wno-register" "-Wno-deprecated-volatile")
14+
615
# No property flag, clang doesn't understand fortify at all
716
set_compiler_property(PROPERTY security_fortify_compile_time)
817
set_compiler_property(PROPERTY security_fortify_run_time)

0 commit comments

Comments
 (0)