From patchwork Sat May 4 14:02:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20001 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 D2D80C3220 for ; Sat, 4 May 2024 14:02:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BC2A362E18; Sat, 4 May 2024 16:02:47 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Vmxcj9BM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 74EAF604C3 for ; Sat, 4 May 2024 16:02:45 +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 1210033D; Sat, 4 May 2024 16:01:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1714831306; bh=XgVnJ/bNXMETKZz8ngKhGSvYPJ6NQKG8hisqGxe9AtI=; h=From:To:Cc:Subject:Date:From; b=Vmxcj9BM9FTa2NIzBLgZHx6lLKTPsPQjHl8oDNM94rUSlvuc/80N2lZYyaIgyJY7M IRsQH0o5ymjmV14A/VD77cLeOnBCi/Ll296TpDe2yDW+wpvF/ZVo3+d7OToGCJ9aDE HbPKpmL0KrdHKR7qPKv/J8eK3d8RvwH+IX0Imt30= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH] test: Don't add current build directory to include path Date: Sat, 4 May 2024 17:02:37 +0300 Message-ID: <20240504140237.19117-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" Meson adds the current source and build directory to the include path by default. This causes a namespace clash in tests when using C++20, as the Span class test is compiled into a binary named 'span', which then gets included by source code through indirect '#include ' directives. Unsurprisingly, the compiler doesn't react happily when fed binary data. We could work around the problem by renaming the test executable, but disabling the implicit inclusion of the local directory is a more generic solution that will avoid similar issues in the future. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- This patch makes libcamera build with cpp_std=c++20. Once merged, I will add a CI test to avoid introduction C++20 compilation breakages, paving the way to move to the newer language version once the ecosystem will be ready. --- test/meson.build | 3 +++ 1 file changed, 3 insertions(+) base-commit: bf4695266bfca8cc21bcf10a3281e874ebce0d27 diff --git a/test/meson.build b/test/meson.build index 8b6057d4e800..5ed052ed62c8 100644 --- a/test/meson.build +++ b/test/meson.build @@ -89,6 +89,7 @@ foreach test : public_tests exe = executable(test['name'], test['sources'], dependencies : deps, + implicit_include_directories : false, link_with : test_libraries, include_directories : test_includes_public) @@ -103,6 +104,7 @@ foreach test : internal_tests exe = executable(test['name'], test['sources'], dependencies : deps, + implicit_include_directories : false, link_with : test_libraries, include_directories : test_includes_internal) @@ -117,6 +119,7 @@ foreach test : internal_non_parallel_tests exe = executable(test['name'], test['sources'], dependencies : deps, + implicit_include_directories : false, link_with : test_libraries, include_directories : test_includes_internal)