From patchwork Mon May 13 12:43:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20044 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 364E8C3226 for ; Mon, 13 May 2024 12:43:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4532A6347E; Mon, 13 May 2024 14:43:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OuQUmWjN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CD5161A64 for ; Mon, 13 May 2024 14:43:31 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C10EBCC8 for ; Mon, 13 May 2024 14:43:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715604205; bh=wJrkQQBTfTy3U8NwTxPPp/AqEr8FbSWgyG8V1NzHIpQ=; h=From:To:Subject:Date:From; b=OuQUmWjNHuaOYG28T6HQ/smRhZOJgDI9kBpxwJI2RsaBXikgwKi2sdeb9xTmhSU33 L3EDlJVOxQNI4jaANJ7gYoyJ1AQWgnbRsOrhmD6gZH2wKSWo53O+EpXnk4VaoGzTYc c3UuKNLxe32pk5tsLL5WwaLxMnQWhjyfWV1ecKyc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH] Documentation: Add option to treat Doxygen warnings as errors Date: Mon, 13 May 2024 15:43:23 +0300 Message-ID: <20240513124323.8933-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" A new Doxygen warning introduced in a recent commit went unnoticed, both in manual tests and in CI. Unlike C/C++ warnings that are treated as errors, we don't fail the build with Doxygen warnings. This is due to the fact that the libcamera documentation compiles cleanly only with quite recent versions of Doxygen. Enabling the WARN_AS_ERROR Doxygen option unconditionally could bother many users. To improve the situation, add a meson option to treat Doxygen warnings as errors. The option is disabled by default, preserving the current behaviour, and will be enabled in CI builds. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Documentation/Doxyfile.in | 1 + Documentation/meson.build | 1 + meson_options.txt | 5 +++++ 3 files changed, 7 insertions(+) base-commit: 3cb20bc2301c03d01a631eb637ab47031d2b91e6 diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in index 2be8d47b8419..abafcf6c6c66 100644 --- a/Documentation/Doxyfile.in +++ b/Documentation/Doxyfile.in @@ -20,6 +20,7 @@ TOC_INCLUDE_HEADINGS = 0 CASE_SENSE_NAMES = YES QUIET = YES +WARN_AS_ERROR = @WARN_AS_ERROR@ INPUT = "@TOP_SRCDIR@/include/libcamera" \ "@TOP_SRCDIR@/src/ipa/ipu3" \ diff --git a/Documentation/meson.build b/Documentation/meson.build index 3872e0a8f522..30d395234952 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -15,6 +15,7 @@ if doxygen.found() and dot.found() cdata.set('TOP_SRCDIR', meson.project_source_root()) cdata.set('TOP_BUILDDIR', meson.project_build_root()) cdata.set('OUTPUT_DIR', meson.current_build_dir()) + cdata.set('WARN_AS_ERROR', get_option('doc_werror') ? 'YES' : 'NO') doxygen_predefined = [] foreach key : config_h.keys() diff --git a/meson_options.txt b/meson_options.txt index c61eb55584b5..7aa412491e91 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,6 +20,11 @@ option('documentation', type : 'feature', description : 'Generate the project documentation') +option('doc_werror', + type : 'boolean', + value : false, + description : 'Treat documentation warnings as errors') + option('gstreamer', type : 'feature', value : 'auto',