Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake case storage
[simgrid.git] / tools / cmake / Tests.cmake
index 39e78d8..fe303df 100644 (file)
@@ -91,9 +91,17 @@ 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})
+  add_library(boost_unit_test_framework SHARED IMPORTED)
+  set_target_properties(boost_unit_test_framework PROPERTIES IMPORTED_LOCATION ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+  target_link_libraries(unit_tmgr simgrid boost_unit_test_framework)
   ADD_TEST(unit_tmgr ${CMAKE_BINARY_DIR}/unit_tmgr --build_info=yes)
-  
+  set_property(
+    TARGET unit_tmgr
+    APPEND PROPERTY
+           INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}"
+          )
+
+
 else()
   set(EXTRA_DIST       ${EXTRA_DIST}       src/surf/trace_mgr_test.cpp)
 endif()
@@ -116,7 +124,7 @@ if((NOT enable_memcheck) AND (NOT enable_address_sanitizer) AND (NOT enable_unde
   SET_TESTS_PROPERTIES(tuto-msg-0 tuto-msg-1 tuto-msg-2 tuto-msg-3 tuto-msg-4 PROPERTIES FIXTURES_REQUIRED tuto-msg-clean)
 
   FOREACH(TUTOTEST tuto-msg-0 tuto-msg-1 tuto-msg-2 tuto-msg-3 tuto-msg-4)
-  SET_TESTS_PROPERTIES(${TUTOTEST} 
+  SET_TESTS_PROPERTIES(${TUTOTEST}
                        PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib")
   ENDFOREACH()
 endif()