Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #237 from oar-team/upstream
[simgrid.git] / teshsuite / xbt / CMakeLists.txt
1 foreach(x log_large log_usage mallocator parallel_log_crashtest)
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(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
7   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
8 endforeach()
9
10 foreach(x parmap_bench parmap_test)
11   add_executable       (${x}  ${x}/${x}.cpp)
12   target_link_libraries(${x}  simgrid)
13   set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
14
15   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
16   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
17 endforeach()
18
19 if(HAVE_MMALLOC)
20   add_executable       (mmalloc_test ${CMAKE_CURRENT_SOURCE_DIR}/mmalloc/mmalloc_test.cpp)
21   target_link_libraries(mmalloc_test simgrid)
22   set_target_properties(mmalloc_test  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mmalloc)
23 endif()
24
25 set(tesh_files    ${tesh_files}     ${CMAKE_CURRENT_SOURCE_DIR}/log_usage/log_usage_ndebug.tesh
26                                     ${CMAKE_CURRENT_SOURCE_DIR}/mmalloc/mmalloc_64.tesh
27                                     ${CMAKE_CURRENT_SOURCE_DIR}/mmalloc/mmalloc_32.tesh          PARENT_SCOPE)
28 set(teshsuite_src ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/mmalloc/mmalloc_test.cpp           PARENT_SCOPE)
29
30 foreach(x log_large parallel_log_crashtest parmap_test) #mallocator parmap_bench
31   ADD_TESH(tesh-xbt-${x} --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/${x} ${x}.tesh)
32 endforeach()
33
34 if(enable_debug)
35   ADD_TESH(tesh-xbt-log --cd ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage/log_usage.tesh)
36 else()
37   ADD_TESH(tesh-xbt-log --cd ${CMAKE_BINARY_DIR}/teshsuite/xbt/log_usage ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/log_usage/log_usage_ndebug.tesh)
38 endif()
39
40 if(HAVE_MMALLOC)
41   if(CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bits
42     ADD_TESH(tesh-xbt-mmalloc-32 --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/mmalloc --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/mmalloc mmalloc_32.tesh)
43   else()
44     ADD_TESH(tesh-xbt-mmalloc-64 --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/xbt/mmalloc --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/xbt/mmalloc mmalloc_64.tesh)
45   endif()
46 endif()