Skip to content

Commit

Permalink
CI tests: don't enable -Wextra-semi for GCC in C mode
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Jan 30, 2025
1 parent adf2c22 commit f003fac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(c_flags ${c_flags} /W4 /WX /D_CRT_SECURE_NO_WARNINGS)
set(cxx_flags ${cxx_flags} /W4 /WX /EHsc /D_CRT_SECURE_NO_WARNINGS)
else()
set(c_flags ${c_flags} -Wall -Wextra -Werror -Wsign-conversion -Wstrict-prototypes -Wextra-semi)
set(c_flags ${c_flags} -Wall -Wextra -Werror -Wsign-conversion -Wstrict-prototypes)
# GCC complains about -Wextra-semi in the C compiler, only accepts it for C++
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(c_flags ${c_flags} -Wextra-semi)
endif()
set(cxx_flags ${cxx_flags} -Wall -Wextra -Werror -Wsign-conversion -fno-rtti -fno-exceptions -Wextra-semi)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(c_flags ${c_flags} -Wno-missing-field-initializers)
Expand Down

0 comments on commit f003fac

Please sign in to comment.