[oe-commits] [meta-openembedded] 05/06: cli11: Add knob to Enable/Disable clang-tidy explicity

git at git.openembedded.org git at git.openembedded.org
Wed Feb 13 17:43:31 UTC 2019


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 8005771517d445d99914bf06ec5af305ca0d406c
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Tue Feb 12 13:31:42 2019 -0800

    cli11: Add knob to Enable/Disable clang-tidy explicity
    
    When building with clang otherwise this gets enabled and we have
    problems with headers especially due to OEs multilibbing effort on arm
    where headers like bits/wordsize.h are hijacked and some wrappers are
    translanted, these transplants have additional requirements/constraints
    e.g. compiler internal arch defines e.g. __arm__ etc. which may not be
    passed by tools like clang-tidy which are arch independent.
    
    Ideally we should not require to disable clang-tidy here but we make a
    compromise, since OEs headers are the way as explained above
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-oe/recipes-support/cli11/cli11_1.6.2.bb       |  5 +++-
 .../cli11/files/0001-Add-CLANG_TIDY-check.patch    | 27 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/cli11/cli11_1.6.2.bb b/meta-oe/recipes-support/cli11/cli11_1.6.2.bb
index 6899b12..e62c1d3 100644
--- a/meta-oe/recipes-support/cli11/cli11_1.6.2.bb
+++ b/meta-oe/recipes-support/cli11/cli11_1.6.2.bb
@@ -6,11 +6,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c271fee3ae28e11b24b97284d9f82887"
 SRCREV = "bd4dc911847d0cde7a6b41dfa626a85aab213baf"
 PV .= "+git${SRCPV}"
 
-SRC_URI += "gitsm://github.com/CLIUtils/CLI11"
+SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
+            file://0001-Add-CLANG_TIDY-check.patch \
+           "
 
 S = "${WORKDIR}/git"
 
 inherit cmake
 inherit ptest
 
+EXTRA_OECMAKE += "-DCLANG_TIDY=OFF"
 DEPENDS += "boost"
diff --git a/meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch b/meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
new file mode 100644
index 0000000..bef3548
--- /dev/null
+++ b/meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
@@ -0,0 +1,27 @@
+From ef6310bc726a53ff6b45071633fa7b37224cae96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Tue, 12 Feb 2019 13:22:21 -0800
+Subject: [PATCH] Add CLANG_TIDY check
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 79404b8..f68217d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -39,7 +39,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+         add_definitions(-Wall -Wextra -pedantic)
+     endif()
+ 
+-    if(CMAKE_VERSION VERSION_GREATER 3.6)
++    if(CMAKE_VERSION VERSION_GREATER 3.6 AND CLANG_TIDY)
+         # Add clang-tidy if available
+         option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
+         find_program(
+-- 
+2.20.1
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list