build: Add --enable-mtp option

This commit is contained in:
F5
2022-10-25 17:11:00 +08:00
parent af331aed29
commit cce2a28a0a
4 changed files with 16 additions and 0 deletions

View File

@@ -148,6 +148,9 @@ macro(write_configtable)
string(APPEND out "MPI Support : ")
check_on_or_off("${NS3_MPI}" "${MPI_FOUND}")
string(APPEND out "Multithreaded Simulation : ")
check_on_or_off("${NS3_MTP}" "ON")
string(APPEND out "ns-3 Click Integration : ")
check_on_or_off("ON" "${NS3_CLICK}")

View File

@@ -873,6 +873,12 @@ macro(process_options)
endif()
endif()
set(ENABLE_MTP FALSE)
if(${NS3_MTP})
add_definitions(-DNS3_MTP)
set(ENABLE_MTP TRUE)
endif()
if(${NS3_VERBOSE})
set_property(GLOBAL PROPERTY TARGET_MESSAGES TRUE)
set(CMAKE_FIND_DEBUG_MODE TRUE)
@@ -1189,6 +1195,10 @@ macro(process_options)
list(REMOVE_ITEM libs_to_build mpi)
endif()
if(NOT ${ENABLE_MTP})
list(REMOVE_ITEM libs_to_build mtp)
endif()
if(NOT ${ENABLE_VISUALIZER})
list(REMOVE_ITEM libs_to_build visualizer)
endif()