aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2025-01-30 18:43:04 +0100
committerAndre Weissflog <floooh@gmail.com>2025-01-30 18:43:04 +0100
commitf003fac7dd4c346a167929a15f13d0da061d2f15 (patch)
tree0444b27f8634f8bcc675257812da18537debe6df /tests
parentadf2c22d94c3bc8f2593b0fc3b63e29ed360510f (diff)
CI tests: don't enable -Wextra-semi for GCC in C mode
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index dff7ebf8..a063f809 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -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)