Skip to content
Snippets Groups Projects
Commit 7291f217 authored by Andreas Schneider's avatar Andreas Schneider Committed by Jakub Jelen
Browse files

cmake: Add compiler warnings for Modern C (C99)

parent 96aee531
No related branches found
No related tags found
No related merge requests found
Pipeline #792120135 passed
......@@ -43,6 +43,12 @@ if (UNIX)
add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wmissing-field-initializers" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wsign-compare" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wold-style-definition" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Werror=old-style-definition" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wimplicit-int" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Werror=implicit-int" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wint-conversion" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Werror=int-conversion" SUPPORTED_COMPILER_FLAGS)
check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT)
if (REQUIRED_FLAGS_WFORMAT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment