dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CMakeList.txt: don't download libbpf source when system library is used
@ 2021-09-20 16:44 Matteo Croce
  2021-09-20 21:16 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Matteo Croce @ 2021-09-20 16:44 UTC (permalink / raw)
  To: dwarves; +Cc: Arnaldo Carvalho de Melo

From: Matteo Croce <mcroce@microsoft.com>

The build system always download the libbpf submodule, regardless if
we're using the embedded or the system version.
Download the libbpf source only if we're using the embedded one.

Signed-off-by: Matteo Croce <mcroce@microsoft.com>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8523bce..2ab66e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ find_package(Python3 QUIET)
 
 # make sure git submodule(s) are checked out
 find_package(Git QUIET)
-if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
+if(LIBBPF_EMBEDDED AND GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
 	# Update submodules as needed
 	option(GIT_SUBMODULE "Check submodules during build" ON)
 	if(GIT_SUBMODULE)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-20 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 16:44 [PATCH] CMakeList.txt: don't download libbpf source when system library is used Matteo Croce
2021-09-20 21:16 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).