Skip to contentSkip to conversation

CMakeList.txt: don't download libbpf source when system library is used

PATCH Applied Matteo Croce 2 participants 2 messages Sep 20, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CMakeList.txt: don't download libbpf source when system library is used

From: Matteo Croce <[email protected]>

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.

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CMakeLists.txt +1 -1
index 8523bce..2ab66e4 100644
@@ -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)
Signature · 1 line
2.31.1
#1 lore raw

Em Mon, Sep 20, 2021 at 06:44:52PM +0200, Matteo Croce escreveu:

Quoted 5 lines

From: Matteo Croce <[email protected]>

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.

Thanks, applied.

- Arnaldo

Quoted 20 lines
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
CMakeLists.txt +1 -1
index 8523bce..2ab66e4 100644
@@ -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)
Signature · 1 line
2.31.1
Signature · 1 line
- Arnaldo