summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-12 13:31:42 -0800
committerKhem Raj <raj.khem@gmail.com>2019-02-13 09:27:22 -0800
commit8005771517d445d99914bf06ec5af305ca0d406c (patch)
treeedc596c2e34505e1ac8f4dd34a7d50e5f2556a92
parent7b01edd129ab2eb30c53a8dd458253d2f7ff1f59 (diff)
downloadmeta-openembedded-8005771517d445d99914bf06ec5af305ca0d406c.tar.gz
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@gmail.com>
-rw-r--r--meta-oe/recipes-support/cli11/cli11_1.6.2.bb5
-rw-r--r--meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch27
2 files changed, 31 insertions, 1 deletions
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 6899b1264..e62c1d3d1 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"
6SRCREV = "bd4dc911847d0cde7a6b41dfa626a85aab213baf" 6SRCREV = "bd4dc911847d0cde7a6b41dfa626a85aab213baf"
7PV .= "+git${SRCPV}" 7PV .= "+git${SRCPV}"
8 8
9SRC_URI += "gitsm://github.com/CLIUtils/CLI11" 9SRC_URI += "gitsm://github.com/CLIUtils/CLI11 \
10 file://0001-Add-CLANG_TIDY-check.patch \
11 "
10 12
11S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
12 14
13inherit cmake 15inherit cmake
14inherit ptest 16inherit ptest
15 17
18EXTRA_OECMAKE += "-DCLANG_TIDY=OFF"
16DEPENDS += "boost" 19DEPENDS += "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 000000000..bef3548a2
--- /dev/null
+++ b/meta-oe/recipes-support/cli11/files/0001-Add-CLANG_TIDY-check.patch
@@ -0,0 +1,27 @@
1From ef6310bc726a53ff6b45071633fa7b37224cae96 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 12 Feb 2019 13:22:21 -0800
4Subject: [PATCH] Add CLANG_TIDY check
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 CMakeLists.txt | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index 79404b8..f68217d 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -39,7 +39,7 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
17 add_definitions(-Wall -Wextra -pedantic)
18 endif()
19
20- if(CMAKE_VERSION VERSION_GREATER 3.6)
21+ if(CMAKE_VERSION VERSION_GREATER 3.6 AND CLANG_TIDY)
22 # Add clang-tidy if available
23 option(CLANG_TIDY_FIX "Perform fixes for Clang-Tidy" OFF)
24 find_program(
25--
262.20.1
27