blob: 3d491e2ef212ffa8e784ff839aa27f1a5f8ad5b3 [file] [log] [blame]
Patrick Williams93c203f2021-10-06 16:15:23 -05001From 3d20210d84f61ee2189927e2d9de9ce3e5a0a9c5 Mon Sep 17 00:00:00 2001
2From: Matteo Croce <mcroce@microsoft.com>
3Date: Mon, 20 Sep 2021 18:44:52 +0200
4Subject: [PATCH] CMakeList.txt: Don't download libbpf source when system
5 library is used
6
7Upstream-Status: Backport [https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=3d20210d84f61ee2189927e2d9de9ce3e5a0a9c5]
8
9The build system always download the libbpf submodule, regardless if
10we're using the embedded or the system version.
11Download the libbpf source only if we're using the embedded one.
12
13Signed-off-by: Matteo Croce <mcroce@microsoft.com>
14Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
15---
16 CMakeLists.txt | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 8523bce..2ab66e4 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -65,7 +65,7 @@ find_package(Python3 QUIET)
24
25 # make sure git submodule(s) are checked out
26 find_package(Git QUIET)
27-if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
28+if(LIBBPF_EMBEDDED AND GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
29 # Update submodules as needed
30 option(GIT_SUBMODULE "Check submodules during build" ON)
31 if(GIT_SUBMODULE)
32--
332.31.1
34