Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not build the examples by default, only when running 'make tests'
[simgrid.git] / tools / cmake / Tests.cmake
index 66c1086..05c1c54 100644 (file)
@@ -1,3 +1,5 @@
+add_custom_target(tests COMMENT "Recompiling the tests")
+
 IF(enable_smpi AND NOT WIN32)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicxx)
@@ -73,7 +75,12 @@ MACRO(SET_TESH_PROPERTIES NAME FACTORIES)
     LIST(REMOVE_AT ARGR 0)
   ENDFOREACH()
   FOREACH(FACTORY ${FACTORIES})
-    set_tests_properties("${NAME}-${FACTORY}" PROPERTIES ${ARGR})
+    if ((${FACTORY} STREQUAL "thread" ) OR # Always available, thanks to C++11 threads
+        (${FACTORY} STREQUAL "boost" AND HAVE_BOOST_CONTEXTS) OR
+        (${FACTORY} STREQUAL "raw" AND HAVE_RAW_CONTEXTS) OR
+        (${FACTORY} STREQUAL "ucontext" AND HAVE_UCONTEXT_CONTEXTS))
+      set_tests_properties("${NAME}-${FACTORY}" PROPERTIES ${ARGR})
+    endif()
   ENDFOREACH()
 ENDMACRO()