From: Martin Quinson Date: Sun, 16 Apr 2023 09:03:31 +0000 (+0200) Subject: Add a target to recompile all ns3 tests (and only them) X-Git-Tag: v3.34~158 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f22a1d622082d4acdea64da24bba850e89374848 Add a target to recompile all ns3 tests (and only them) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 25f7ba2da5..4157980789 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -755,6 +755,8 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES add_custom_target(tests COMMENT "Recompiling the tests") add_custom_target(tests-mc COMMENT "Recompiling the MC tests and tools.") add_dependencies(tests tests-mc) +add_custom_target(tests-ns3 COMMENT "Recompiling the ns3 tests and tools.") +add_dependencies(tests tests-ns3) ### Build some Maintainer files include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MaintainerMode.cmake) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index a43cfdab14..d7999d272e 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -125,6 +125,10 @@ if(SIMGRID_HAVE_NS3) set(tesh_files ${tesh_files} ${CMAKE_HOME_DIRECTORY}/examples/cpp/network-ns3/s4u-network-ns3-timed.tesh) endif() +foreach (example network-ns3 network-ns3-wifi) + add_dependencies(tests-ns3 s4u-${example}) +endforeach() + else() # Even if ns3 is not found, we need to override the teshfile name and make sure that everything gets included in the archive set(_network-ns3_teshfile ${CMAKE_HOME_DIRECTORY}/examples/cpp/network-ns3/s4u-network-ns3-notime.tesh) diff --git a/teshsuite/s4u/CMakeLists.txt b/teshsuite/s4u/CMakeLists.txt index 83969f8392..56d9e61ea0 100644 --- a/teshsuite/s4u/CMakeLists.txt +++ b/teshsuite/s4u/CMakeLists.txt @@ -105,7 +105,7 @@ if(SIMGRID_HAVE_NS3) add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp) target_link_libraries(${x} simgrid) set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x}) - add_dependencies(tests ${x}) + add_dependencies(tests-ns3 ${x}) ADD_TESH(tesh-s4u-${x} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/teshsuite/s4u/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/s4u/${x}/${x}.tesh) endforeach() endif()