Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bump osx version for travis
[simgrid.git] / teshsuite / simix / CMakeLists.txt
1 foreach(x check-defaults generic-simcalls stack-overflow)
2   add_executable       (${x}  EXCLUDE_FROM_ALL ${x}/${x}.cpp)
3   target_link_libraries(${x}  simgrid)
4   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
5   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
6   add_dependencies(tests ${x})
7 endforeach()
8
9 foreach (factory raw thread boost ucontext)
10   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/check-defaults/factory_${factory}.tesh)
11 endforeach()
12
13 set(teshsuite_src  ${teshsuite_src}                                                                        PARENT_SCOPE)
14 set(tesh_files     ${tesh_files}     
15     ${CMAKE_CURRENT_SOURCE_DIR}/stack-overflow/stack-overflow.tesh  
16     ${CMAKE_CURRENT_SOURCE_DIR}/generic-simcalls/generic-simcalls.tesh    
17     PARENT_SCOPE)
18
19 IF(HAVE_RAW_CONTEXTS)
20   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_raw.tesh)
21 ELSEIF(HAVE_UCONTEXT_CONTEXTS)
22   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_ucontext.tesh)
23 ELSEIF(HAVE_BOOST_CONTEXTS)
24   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_boost.tesh)
25 ELSE()
26   ADD_TESH(tesh-simix-factory-default --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_thread.tesh)
27 ENDIF()
28
29 if (NOT enable_memcheck AND NOT enable_address_sanitizer AND NOT enable_thread_sanitizer)
30   ADD_TESH_FACTORIES(stack-overflow   "ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/stack-overflow --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/stack-overflow stack-overflow.tesh)
31   if (WIN32)
32     SET_TESH_PROPERTIES(stack-overflow "ucontext;raw;boost" WILL_FAIL true)
33   endif()
34 endif()
35 ADD_TESH_FACTORIES(generic-simcalls "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/generic-simcalls --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/generic-simcalls generic-simcalls.tesh)
36
37 foreach (factory raw thread boost ucontext)
38   string (TOUPPER have_${factory}_contexts VARNAME)
39   if (${factory} STREQUAL "thread" OR ${VARNAME})
40     # Cannot use ADD_TESH() here since ${factory} is part of the tesh filename
41     ADD_TESH(tesh-simix-factory-${factory} --cfg contexts/factory:${factory} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/simix/check-defaults --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/simix/check-defaults factory_${factory}.tesh)
42   endif()
43 endforeach()