From a66fe04c1949328101ed8bdbf0274b89d0f03c16 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Mon, 26 Nov 2018 14:22:14 +0000 Subject: build: Add project arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add language specific project arguments and ensure that -Werror is enabled, enforcing code to be as clean as possible. Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/meson.build b/meson.build index 1f57b49d..17767b9e 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,19 @@ project('libcamera - supporting complex camera pipelines', 'c', 'cpp', version : '0.1', license : 'LGPL 2.1+') +common_arguments = [ + '-Wall', + '-Wextra', + '-Werror', + '-Wno-unused-parameter', +] + +c_arguments = common_arguments +cpp_arguments = common_arguments + +add_project_arguments(c_arguments, language: 'c') +add_project_arguments(cpp_arguments, language: 'cpp') + inc = include_directories('include') subdir('include') -- cgit v1.2.1