From 2fc24282e3bcfcbbd4359e50ec0e5dc8690c9963 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Fri, 16 May 2025 12:14:26 +0200 Subject: [PATCH] build, lte: Only enable emulation features when EmuNetDevice dependencies are met --- build-support/macros-and-definitions.cmake | 9 +++++++++ src/lte/CMakeLists.txt | 4 +++- src/lte/examples/CMakeLists.txt | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index 5f7606904..35eb4163a 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -1174,6 +1174,15 @@ macro(process_options) set(ENABLE_TAP OFF) set(ENABLE_EMU OFF) set(ENABLE_FDNETDEV FALSE) + mark_as_advanced( + ENABLE_FDNETDEV ENABLE_DPDKDEVNET ENABLE_TAPNETDEV ENABLE_EMUNETDEV + ENABLE_NETMAP_EMU + ) + set(ENABLE_FDNETDEV False CACHE INTERNAL "") + set(ENABLE_DPDKDEVNET False CACHE INTERNAL "") + set(ENABLE_TAPNETDEV False CACHE INTERNAL "") + set(ENABLE_EMUNETDEV False CACHE INTERNAL "") + set(ENABLE_NETMAP_EMU False CACHE INTERNAL "") list(REMOVE_ITEM libs_to_build fd-net-device) message( STATUS diff --git a/src/lte/CMakeLists.txt b/src/lte/CMakeLists.txt index f5bfccaba..91911b255 100644 --- a/src/lte/CMakeLists.txt +++ b/src/lte/CMakeLists.txt @@ -2,7 +2,9 @@ set(emu_sources) set(emu_headers) set(emu_features) set(emu_libraries) -if(${ENABLE_EMU}) +if(${ENABLE_EMU} + AND ${ENABLE_EMUNETDEV} +) set(emu_sources helper/emu-epc-helper.cc ) diff --git a/src/lte/examples/CMakeLists.txt b/src/lte/examples/CMakeLists.txt index 2f0d08add..525502e76 100644 --- a/src/lte/examples/CMakeLists.txt +++ b/src/lte/examples/CMakeLists.txt @@ -36,7 +36,9 @@ foreach( ) endforeach() -if(${ENABLE_EMU}) +if(${ENABLE_EMU} + AND ${ENABLE_EMUNETDEV} +) build_lib_example( NAME lena-simple-epc-emu SOURCE_FILES lena-simple-epc-emu.cc