File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,14 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
123123 add_compile_options (-Wno-empty-translation-unit )
124124 add_compile_options (-Wno-cast-align )
125125 add_compile_options (-Wno-typedef-redefinition )
126- add_compile_options (-Wno-c11-extensions )
127- add_compile_options (-Wno-pre-c11-compat ) # fixes build on Debian
128- add_compile_options (-Wno-unknown-warning-option ) # unknown warning option '-Wno-pre-c11-compat'
129126 add_compile_options (-Wno-thread-safety-analysis )
127+ add_compile_options (-Wno-c11-extensions )
128+
129+ check_c_compiler_flag (-Wpre-c11-compat COMPILER_SUPPORTS_W_PRE_C11_COMPAT )
130+ if (COMPILER_SUPPORTS_W_PRE_C11_COMPAT)
131+ add_compile_options (-Wno-pre-c11-compat )
132+ endif ()
133+
130134 if (CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
131135 add_compile_options (-Wno-unsafe-buffer-usage )
132136 add_compile_options (-Wno-cast-function-type-strict )
You can’t perform that action at this time.
0 commit comments