tests: Add -Wall, -Wextra, -pedantic, -Werror

This commit is contained in:
Ash Logan 2020-03-12 12:36:47 +11:00
parent 3803e021f1
commit 78467b6927
6 changed files with 21 additions and 0 deletions

View File

@ -7,4 +7,10 @@ set(CMAKE_C_STANDARD 11)
add_executable(test_compile_headers_as_c11 add_executable(test_compile_headers_as_c11
main.c) main.c)
target_compile_options(test_compile_headers_as_c11 PRIVATE
-Wall
-Wextra
-pedantic
-Werror)
wut_create_rpx(test_compile_headers_as_c11) wut_create_rpx(test_compile_headers_as_c11)

View File

@ -2,5 +2,6 @@
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
(void)argc, (void)argv;
return 0; return 0;
} }

View File

@ -7,4 +7,10 @@ set(CMAKE_C_STANDARD 99)
add_executable(test_compile_headers_as_c99 add_executable(test_compile_headers_as_c99
main.c) main.c)
target_compile_options(test_compile_headers_as_c99 PRIVATE
-Wall
-Wextra
-pedantic
-Werror)
wut_create_rpx(test_compile_headers_as_c99) wut_create_rpx(test_compile_headers_as_c99)

View File

@ -2,5 +2,6 @@
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
(void)argc, (void)argv;
return 0; return 0;
} }

View File

@ -5,4 +5,10 @@ include("${DEVKITPRO}/wut/share/wut.cmake" REQUIRED)
add_executable(test_compile_headers_as_cpp add_executable(test_compile_headers_as_cpp
main.cpp) main.cpp)
target_compile_options(test_compile_headers_as_cpp PRIVATE
-Wall
-Wextra
-pedantic
-Werror)
wut_create_rpx(test_compile_headers_as_cpp) wut_create_rpx(test_compile_headers_as_cpp)

View File

@ -2,5 +2,6 @@
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
(void)argc, (void)argv;
return 0; return 0;
} }