build: Increase strictness of warnings.

This commit is contained in:
Ryan Pavlik 2020-07-16 15:38:17 -05:00
parent 1476d396f8
commit e2cb7578bc
2 changed files with 3 additions and 0 deletions

View file

@ -162,6 +162,7 @@ endif()
if(NOT MSVC) if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

View file

@ -19,6 +19,8 @@ cpp = meson.get_compiler('cpp')
add_project_arguments(cc.get_supported_arguments([ add_project_arguments(cc.get_supported_arguments([
'-D_XOPEN_SOURCE=700', '-D_XOPEN_SOURCE=700',
'-Wno-unused-parameter', '-Wno-unused-parameter',
'-Werror-implicit-function-declaration',
'-Werror=incompatible-pointer-types'
]), language: 'c') ]), language: 'c')
add_project_arguments(cpp.get_supported_arguments([ add_project_arguments(cpp.get_supported_arguments([