Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Future chaining
[simgrid.git] / teshsuite / simix / CMakeLists.txt
1 foreach(x check_defaults stack_overflow)
2   add_executable       (${x}  ${x}/${x}.c)
3   target_link_libraries(${x}  simgrid)
4   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
5
6   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
7 endforeach()
8
9 foreach(x generic_simcalls)
10   add_executable       (${x}  ${x}/${x}.cpp)
11   target_link_libraries(${x}  simgrid)
12   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
13   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
14 endforeach()
15
16 foreach (factory raw thread boost ucontext)
17   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/check_defaults/factory_${factory}.tesh)
18 endforeach()
19
20 set(teshsuite_src  ${teshsuite_src}                                                                        PARENT_SCOPE)
21 set(tesh_files     ${tesh_files}     
22     ${CMAKE_CURRENT_SOURCE_DIR}/stack_overflow/stack_overflow.tesh  
23     ${CMAKE_CURRENT_SOURCE_DIR}/generic_simcalls/generic_simcalls.tesh    
24     PARENT_SCOPE)
25
26 IF(HAVE_RAW_CONTEXTS)
27   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)
28 ELSEIF(HAVE_UCONTEXT_CONTEXTS)
29   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)
30 ELSEIF(HAVE_BOOST_CONTEXTS)
31   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)
32 ELSE()
33   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)
34 ENDIF()
35
36 if (NOT enable_memcheck)
37 ADD_TESH_FACTORIES(stack-overflow   "thread;ucontext;boost;raw" --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)
38 ADD_TESH_FACTORIES(generic-simcalls "thread;ucontext;boost;raw" --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)
39 endif()
40
41 foreach (factory raw thread boost ucontext)
42   string (TOUPPER have_${factory}_contexts VARNAME)
43   if (${VARNAME})
44     if (release AND (WIN32 OR CMAKE_SYSTEM_NAME MATCHES "Darwin"))
45       SET_TESTS_PROPERTIES(stack-overflow-${factory} PROPERTIES WILL_FAIL true)
46     endif()
47     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)
48   endif()
49 endforeach()