diff --git a/buildsupport/custom_modules/ns3_contributions.cmake b/buildsupport/custom_modules/ns3_contributions.cmake index f604b1816..c08b27c2a 100644 --- a/buildsupport/custom_modules/ns3_contributions.cmake +++ b/buildsupport/custom_modules/ns3_contributions.cmake @@ -27,7 +27,7 @@ macro(process_contribution contribution_list) foreach(contribname ${contribution_list}) set(folder "contrib/${contribname}") if(EXISTS ${PROJECT_SOURCE_DIR}/${folder}/CMakeLists.txt) - message(STATUS "Processing ${folder}") + message(STATUS "Processing ${folder}") add_subdirectory(${folder}) else() message( diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index f57ea4370..b2200a911 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -1,16 +1,17 @@ set(name test) -set(csma-layout_sources) -if(csma-layout IN_LIST ns3-all-enabled-modules) - set(csma-layout_sources csma-system-test-suite.cc) -endif() - set(dsr_sources) -if(dsr IN_LIST ns3-all-enabled-modules) + +# cmake-format: off +if((dsr IN_LIST ns3-all-enabled-modules) + AND (uan IN_LIST ns3-all-enabled-modules) + AND (olsr IN_LIST ns3-all-enabled-modules)) set(dsr_sources traced/traced-callback-typedef-test-suite.cc) endif() +# cmake-format: on set(application_sources) +set(csma_sources) set(wifi_sources) if(applications IN_LIST ns3-all-enabled-modules) if(point-to-point IN_LIST ns3-all-enabled-modules) @@ -30,12 +31,21 @@ if(applications IN_LIST ns3-all-enabled-modules) ns3wifi/wifi-msdu-aggregator-test-suite.cc ) endif() + if((csma-layout IN_LIST ns3-all-enabled-modules) + AND (internet-apps IN_LIST ns3-all-enabled-modules) + ) + set(csma_sources csma-system-test-suite.cc) + endif() endif() set(internet_sources) if(internet IN_LIST ns3-all-enabled-modules) set(internet_sources ns3tcp/ns3tcp-socket-writer.cc) +endif() +set(network_sources) +if(network IN_LIST ns3-all-enabled-modules) + set(network_sources traced/traced-value-callback-typedef-test-suite.cc) endif() set(traffic-control_sources) @@ -50,12 +60,14 @@ endif() add_library( ${lib${name}} OBJECT + ${PROJECT_SOURCE_DIR}/buildsupport/empty.cc # empty source file if only + # libcore is enabled ${applications_sources} - ${csma-layout_sources} + ${csma_sources} ${dsr_sources} ${internet_sources} + ${network_sources} ${traffic-control_sources} - traced/traced-value-callback-typedef-test-suite.cc ${wifi_sources} ) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index fffbd6d94..b960c4e10 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -24,7 +24,7 @@ set_runtime_outputdirectory( bench-simulator ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/utils/ "" ) -if (network IN_LIST libs_to_build) +if(network IN_LIST libs_to_build) add_executable(bench-packets bench-packets.cc) target_link_libraries(bench-packets ${libnetwork}) set_runtime_outputdirectory( @@ -34,7 +34,6 @@ if (network IN_LIST libs_to_build) add_executable(print-introspected-doxygen print-introspected-doxygen.cc) target_link_libraries(print-introspected-doxygen ${libnetwork}) set_runtime_outputdirectory( - print-introspected-doxygen ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/utils/ "" + print-introspected-doxygen ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/utils/ "" ) endif() -