From patchwork Mon Nov 26 14:26:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 17 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C98D660004 for ; Mon, 26 Nov 2018 15:26:40 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 449AD544; Mon, 26 Nov 2018 15:26:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1543242400; bh=akjZjaBXKiUpR5SSeGazhNYT2vg+pYqxEaUaao7UIWM=; h=From:To:Cc:Subject:Date:From; b=Tu/FcPwKfE7eFBLVJu3a6bdbrZav61fJCKQgcMJLpSREEvBGLvspxKhqoBTtRdLbn 1FOTnhbYYVG6GXeuig2eRlu52GKKZAF++Gh25UX/swBBTUVFX/cmUsjQxNzSmGks/H x/uqPHnPlsla5+k9YBYLWY5sfny1EXs0qZhDKF9o= From: Kieran Bingham To: LibCamera Devel Date: Mon, 26 Nov 2018 14:26:35 +0000 Message-Id: <20181126142635.14078-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 Subject: [libcamera-devel] [PATCH] build: Add project arguments X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 14:26:40 -0000 Add language specific project arguments and ensure that -Werror is enabled, enforcing code to be as clean as possible. Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- 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')