Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix the link to Boost_UNIT_TEST_FRAMEWORK
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 3 Jun 2018 19:16:18 +0000 (21:16 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 3 Jun 2018 19:17:10 +0000 (21:17 +0200)
Thanks to Olivier for the patch. It (fix: #267).

ChangeLog
tools/cmake/Tests.cmake

index 59b8de4..46c7daa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@ XBT:
 Fixed bugs:
  - #143: Setting a breakpoint at a given time
  - #258: daemonized actors hang after all non-daemonized actors have completed
+ - #267: Linker error on unit_tmgr
 
 ----------------------------------------------------------------------------
 
index d596f36..a33fab0 100644 (file)
@@ -91,7 +91,8 @@ ADD_TEST(testall                                 ${CMAKE_BINARY_DIR}/testall)
 # New tests should use the Boost Unit Test Framework
 if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
   add_executable       (unit_tmgr src/surf/trace_mgr_test.cpp)
-  target_link_libraries(unit_tmgr simgrid ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+  get_filename_component(Boost_UNIT_TEST_FRAMEWORK_LIBRARY_dir ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} DIRECTORY)
+  target_link_libraries(unit_tmgr simgrid "-L${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_dir}" "-lboost_unit_test_framework")
   ADD_TEST(unit_tmgr ${CMAKE_BINARY_DIR}/unit_tmgr --build_info=yes)
   set_property(
     TARGET unit_tmgr