From f863b4bd2680a21b978e635d2516513d8fde3dc5 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sat, 23 Dec 2023 23:23:12 +0100 Subject: [PATCH] tests: force linking of ns-3 libraries to test-runner Prevents undefined symbols when tests are restricted by NS3_FILTER_MODULE_EXAMPLES_AND_TESTS --- utils/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 17ff4d2db..c04e90bb4 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -33,13 +33,11 @@ if(${ENABLE_TESTS}) if(${NS3_MONOLIB}) target_link_libraries( - test-runner ${LIB_AS_NEEDED_PRE} ${ns3-libs-tests} ${LIB_AS_NEEDED_POST} - ${lib-ns3-monolib} ${ns3-contrib-libs} + test-runner ${LIB_AS_NEEDED_PRE} ${ns3-libs-tests} ${lib-ns3-monolib} ${ns3-contrib-libs} ${LIB_AS_NEEDED_POST} ) else() target_link_libraries( - test-runner ${LIB_AS_NEEDED_PRE} ${ns3-libs-tests} ${LIB_AS_NEEDED_POST} - ${ns3-libs} ${ns3-contrib-libs} + test-runner ${LIB_AS_NEEDED_PRE} ${ns3-libs-tests} ${ns3-libs} ${ns3-contrib-libs} ${LIB_AS_NEEDED_POST} ) endif() endif()