build, lte: Only enable emulation features when EmuNetDevice dependencies are met

This commit is contained in:
Gabriel Ferreira
2025-05-16 12:14:26 +02:00
parent c0010702ce
commit 2fc24282e3
3 changed files with 15 additions and 2 deletions

View File

@@ -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

View File

@@ -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
)

View File

@@ -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