Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'pikachuyann/simgrid-stoprofiles'
[simgrid.git] / teshsuite / smpi / mpich3-test / datatype / CMakeLists.txt
1 if(enable_smpi AND enable_smpi_MPICH3_testsuite)
2   if(WIN32)
3     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
4   else()
5     set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
6     set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
7   endif()
8
9   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
10   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
11
12   foreach(file blockindexed-zero-count contigstruct contig-zero-count cxx-types dataalign gaddress hindexed_block
13           hindexed_block_contents hvecblklen large_vec localpack longdouble simple-commit simple-pack simple-resized simple-size-extent
14           struct-derived-zeros struct-ezhov struct-pack struct-verydeep struct-zero-count tfree transpose-pack tresized2
15           tresized typecommit typefree typelb typename unpack vecblklen zeroblks zeroparms
16           subarray subarray-pack contents)
17     # not compiled files
18     # blockindexed-misc darray-cyclic darray-pack get-elements get-elements-pairtype getpartelm get-struct
19     # hindexed-zeros indexed-misc large-count large_type large_type_sendrec lbub lots-of-type pairtype-pack
20     # pairtype-size-extent segtest simple-pack-external simple-pack-external2 sizedtypes slice-pack slice-pack-external struct-empty-el
21     # struct-no-real-type structpack2 subarray subarray-pack tmatchsize triangular-pack unusual-noncontigs
22     # zero-blklen-vector
23     add_executable(${file} EXCLUDE_FROM_ALL ${file}.c)
24     add_dependencies(tests ${file})
25     target_link_libraries(${file} simgrid mtest_c)
26   endforeach()
27
28   add_executable(sendrecvt2 EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/../util/dtypes.c sendrecvt2.c)
29   add_executable(sendrecvt4 EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/../util/dtypes.c sendrecvt4.c)
30   add_dependencies(tests sendrecvt2 sendrecvt4)
31   target_link_libraries(sendrecvt2 simgrid mtest_c)
32   target_link_libraries(sendrecvt4 simgrid mtest_c)
33   set_target_properties(hindexed_block PROPERTIES COMPILE_FLAGS "-DTEST_HINDEXED_BLOCK" LINK_FLAGS "-DTEST_HINDEXED_BLOCK")
34
35
36 endif()
37
38 if (enable_smpi_MPICH3_testsuite AND HAVE_RAW_CONTEXTS)
39   ADD_TEST(test-smpi-mpich3-datatype-raw   ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/datatype ${PERL_EXECUTABLE} ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests "-wrapper=${TESH_WRAPPER}" -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/datatype -tests=testlist -execarg=--cfg=contexts/factory:raw)
40   SET_TESTS_PROPERTIES(test-smpi-mpich3-datatype-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
41 endif()
42
43 foreach(file blockindexed-misc blockindexed-zero-count contents contigstruct contig-zero-count cxx-types darray-cyclic 
44         darray-pack dataalign gaddress get-elements get-elements-pairtype getpartelm hindexed_block
45         hindexed_block_contents hindexed-zeros hvecblklen indexed-misc large-count large_type large_type_sendrec lbub
46         localpack longdouble lots-of-types pairtype-pack pairtype-size-extent segtest sendrecvt2 sendrecvt4 
47         simple-commit simple-pack simple-pack-external simple-pack-external2 simple-resized simple-size-extent sizedtypes slice-pack 
48         slice-pack-external large_vec struct-derived-zeros struct-empty-el struct-ezhov struct-no-real-types struct-pack 
49         structpack2 struct-verydeep struct-zero-count subarray subarray-pack tfree tmatchsize transpose-pack tresized2
50         tresized triangular-pack typecommit typefree typelb typename unpack unusual-noncontigs vecblklen 
51         zero-blklen-vector zeroblks zeroparms)
52   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file}.c)
53 endforeach()
54
55 set(examples_src  ${examples_src}                                        PARENT_SCOPE)
56 set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/testlist  PARENT_SCOPE)