11function (_get_common_test_compile_options output_var c_test flags )
22 _get_compile_options_from_flags(compile_flags ${flags} )
33
4- # Remove -fno-math-errno if it was added.
5- if (LIBC_ADD_FNO_MATH_ERRNO)
6- list (REMOVE_ITEM compile_options "-fno-math-errno" )
7- endif ()
8-
94 set (compile_options
105 ${LIBC_COMPILE_OPTIONS_DEFAULT}
116 ${LIBC_TEST_COMPILE_OPTIONS_DEFAULT}
@@ -39,9 +34,7 @@ function(_get_common_test_compile_options output_var c_test flags)
3934 # list(APPEND compile_options "-Wconversion")
4035 # list(APPEND compile_options "-Wno-sign-conversion")
4136 list (APPEND compile_options "-Wimplicit-fallthrough" )
42- list (APPEND compile_options "-Wstrict-prototypes" )
4337 list (APPEND compile_options "-Wwrite-strings" )
44- list (APPEND compile_options "-Wextra-semi" )
4538 # Silence this warning because _Complex is a part of C99.
4639 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
4740 if (NOT c_test)
@@ -53,6 +46,8 @@ function(_get_common_test_compile_options output_var c_test flags)
5346 endif ()
5447 list (APPEND compile_options "-Wno-pedantic" )
5548 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
49+ list (APPEND compile_options "-Wstrict-prototypes" )
50+ list (APPEND compile_options "-Wextra-semi" )
5651 list (APPEND compile_options "-Wnewline-eof" )
5752 list (APPEND compile_options "-Wnonportable-system-include-path" )
5853 list (APPEND compile_options "-Wthread-safety" )
0 commit comments