build: Add --enable-mtp option
This commit is contained in:
@@ -75,6 +75,7 @@ option(NS3_MONOLIB
|
||||
"Build a single shared ns-3 library and link it against executables" OFF
|
||||
)
|
||||
option(NS3_MPI "Build with MPI support" OFF)
|
||||
option(NS3_MTP "Build with Multithreaded simulation support" OFF)
|
||||
option(NS3_NATIVE_OPTIMIZATIONS "Build with -march=native -mtune=native" OFF)
|
||||
set(NS3_OUTPUT_DIRECTORY "" CACHE STRING "Directory to store built artifacts")
|
||||
option(NS3_PRECOMPILE_HEADERS
|
||||
|
||||
@@ -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}")
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
2
ns3
2
ns3
@@ -133,6 +133,7 @@ def parse_args(argv):
|
||||
("logs", "the logs regardless of the compile mode"),
|
||||
("monolib", "a single shared library with all ns-3 modules"),
|
||||
("mpi", "the MPI support for distributed simulation"),
|
||||
("mtp", "Multithreading support for high speed parallel simulation"),
|
||||
("python-bindings", "python bindings"),
|
||||
("tests", "the ns-3 tests"),
|
||||
("sanitizers", "address, memory leaks and undefined behavior sanitizers"),
|
||||
@@ -536,6 +537,7 @@ def configure_cmake(cmake, args, current_cmake_cache_folder, current_cmake_gener
|
||||
("LOG", "logs"),
|
||||
("MONOLIB", "monolib"),
|
||||
("MPI", "mpi"),
|
||||
("MTP", "mtp"),
|
||||
("PYTHON_BINDINGS", "python_bindings"),
|
||||
("SANITIZE", "sanitizers"),
|
||||
("STATIC", "static"),
|
||||
|
||||
Reference in New Issue
Block a user