Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
File simgrid_modules.map is gone too.
[simgrid.git] / tools / cmake / Tests.cmake
index 35bf1db03f45f142ac78ccd85305ce1c1251037e..3375fcf9fa7df6cde068da307bdd959f199ed0dc 100644 (file)
@@ -62,7 +62,13 @@ MACRO(ADD_TESH_FACTORIES NAME FACTORIES)
         (${FACTORY} STREQUAL "raw" AND HAVE_RAW_CONTEXTS) OR
         (${FACTORY} STREQUAL "ucontext" AND HAVE_UCONTEXT_CONTEXTS))
       ADD_TESH("${NAME}-${FACTORY}" "--cfg" "contexts/factory:${FACTORY}" ${ARGR})
-    ENDIF()
+    endif()
+    if ((NOT ${FACTORY} STREQUAL "thread") AND 
+        (NOT ${FACTORY} STREQUAL "boost") AND
+       (NOT ${FACTORY} STREQUAL "raw") AND
+       (NOT ${FACTORY} STREQUAL "ucontext"))
+       message(FATAL_ERROR "Cannot add a tesh for an unknown factory: ${FACTORY}")
+    endif()
   ENDFOREACH()
 ENDMACRO()
 
@@ -111,7 +117,6 @@ add_dependencies     (tests unit-tests)
 target_link_libraries(unit-tests simgrid)
 ADD_TEST(unit-tests ${CMAKE_BINARY_DIR}/unit-tests)
 set_property(TARGET unit-tests APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
-add_dependencies(tests unit-tests)
 set(EXTRA_DIST ${EXTRA_DIST} ${UNIT_TESTS})
 
 unset(UNIT_TESTS)