From patchwork Tue Feb 18 00:14:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2847 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A9C0B60438 for ; Tue, 18 Feb 2020 01:14:27 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 295DC1220 for ; Tue, 18 Feb 2020 01:14:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1581984867; bh=BIlcHxuoKjU2x75KEbyBRDmm95PlpT7ipO4zo24grSI=; h=From:To:Subject:Date:From; b=nUREP9YfD95WIc5Euz9D9UJcuR06VpBZFGZ4foJgfpocCsvRuQGTkcnctK76p9FRf E+UQrf8qnSD+/QTNlkwdMCrNGaBwndFflQ8KefU+cyrGXiy3KD33s4Jy2wgLTbCYgh E8Jeczc3kyNoWIl3yZkBnNWy4WatkI0hUe/6I7Y0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 18 Feb 2020 02:14:05 +0200 Message-Id: <20200218001405.18232-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] qcam: Fix compilation errors with clang-10 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: , X-List-Received-Date: Tue, 18 Feb 2020 00:14:27 -0000 clang-10 has introduced the same deprecated-copy warning that appeared in gcc-9 and caused build issues with Qt header files. However, the clang version seems more sensitive, and detects issues that are not fixed in Qt 5.13, unlike gcc-9. Extend the logic that disables the warning for gcc-9 and Qt < 5.13 to cover clang-10 and all Qt versions. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Kieran Bingham --- src/qcam/meson.build | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/qcam/meson.build b/src/qcam/meson.build index 5b877a84da85..5150631b55c8 100644 --- a/src/qcam/meson.build +++ b/src/qcam/meson.build @@ -25,13 +25,12 @@ if qt5_dep.found() qt5_cpp_args = [ '-DQT_NO_KEYWORDS' ] # gcc 9 introduced a deprecated-copy warning that is triggered by Qt until - # Qt 5.13. Disable it manually. - if cc.get_id() == 'gcc' - gcc_version = cc.version().split('.') - qt5_version = qt5_dep.version().split('.') - if qt5_version[1].to_int() < 13 and gcc_version[0].to_int() >= 9 - qt5_cpp_args += [ '-Wno-deprecated-copy' ] - endif + # Qt 5.13. clang 10 introduced the same warning, but detects more issues + # that are not fixed in Qt yet. Disable the warning manually in both cases. + if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and + qt5_dep.version().version_compare('<5.13')) or + (cc.get_id() == 'clang' and cc.version().version_compare('>=10.0'))) + qt5_cpp_args += [ '-Wno-deprecated-copy' ] endif resources = qt5.preprocess(moc_headers: qcam_moc_headers,