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

Kieran Bingham kieran.bingham at ideasonboard.com
Mon Nov 26 15:26:35 CET 2018


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>

---

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



More information about the libcamera-devel mailing list