[libcamera-devel] [PATCH] build: Add project arguments

Niklas Söderlund niklas.soderlund at ragnatech.se
Mon Nov 26 17:21:22 CET 2018


Hi Kieran,

Thanks for your work.

On 2018-11-26 14:26:35 +0000, Kieran Bingham wrote:
> Add language specific project arguments and ensure that -Werror is
> enabled, enforcing code to be as clean as possible.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> 
> ---
> 
> This should be kept for development as much as possible, but we may want
> to have an automatic relaxation for package builds rather than developer
> builds so that external compiler changes do not block users.
> 
>  meson.build | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 494193483079..f1fcb8e20e00 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -7,6 +7,18 @@ project('libcamera - supporting complex camera pipelines', 'c', 'cpp',
>  #	generated from this too.
>  api_version = '0.1'
>  
> +common_arguments = [
> +	'-Wall',
> +	'-Wextra',
> +	'-Werror',
> +]
> +
> +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('Documentation')
> -- 
> 2.17.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list