Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
23601c4067c73c571a02e68831cb2d3d15e3e33e
[simgrid.git] / teshsuite / smpi / mpich3-test / f90 / coll / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(enable_smpi AND SMPI_F2C)
4   if(WIN32)
5     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
6   else()
7     set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
8     set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
9   endif()
10
11   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
12   set(MPICH_FLAGS "-DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1  -Wno-error=unused-variable")
13   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
14
15   add_executable(allredint8f90 allredint8f90.f90 ../util/mtestf90.f90)
16   add_executable(allredopttf90 allredopttf90.f90 ../util/mtestf90.f90)
17   add_executable(alltoallvf90 alltoallvf90.f90 ../util/mtestf90.f90)
18   add_executable(alltoallwf90 alltoallwf90.f90 ../util/mtestf90.f90)
19   add_executable(exscanf90 exscanf90.f90 ../util/mtestf90.f90)
20   add_executable(inplacef90 inplacef90.f90 ../util/mtestf90.f90)
21  # add_executable(nonblockingf90 nonblockingf90.f90 ../util/mtestf90.f90)
22  # add_executable(nonblocking_inpf90 nonblocking_inpf90.f90 ../util/mtestf90.f90)
23   add_executable(red_scat_blockf90 red_scat_blockf90.f90 ../util/mtestf90.f90)
24   add_executable(redscatf90 redscatf90.f90 ../util/mtestf90.f90)
25   add_executable(reducelocalf90 reducelocalf90.f90 ../util/mtestf90.f90)
26   add_executable(split_typef90 split_typef90.f90 ../util/mtestf90.f90)
27   add_executable(uallreducef90 uallreducef90.f90 ../util/mtestf90.f90)
28   add_executable(vw_inplacef90 vw_inplacef90.f90 ../util/mtestf90.f90)
29   target_link_libraries(allredint8f90  simgrid)
30   target_link_libraries(allredopttf90  simgrid)
31   target_link_libraries(alltoallvf90  simgrid)
32   target_link_libraries(alltoallwf90  simgrid)
33   target_link_libraries(exscanf90  simgrid)
34   target_link_libraries(inplacef90  simgrid)
35  # target_link_libraries(nonblockingf90  simgrid)
36  # target_link_libraries(nonblocking_inpf90  simgrid)
37   target_link_libraries(red_scat_blockf90  simgrid)
38   target_link_libraries(redscatf90  simgrid)
39   target_link_libraries(reducelocalf90  simgrid)
40   target_link_libraries(split_typef90  simgrid)
41   target_link_libraries(uallreducef90  simgrid)
42   target_link_libraries(vw_inplacef90  simgrid)
43   set_target_properties(allredint8f90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
44   set_target_properties(allredopttf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
45   set_target_properties(alltoallvf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
46   set_target_properties(alltoallwf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
47   set_target_properties(exscanf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
48   set_target_properties(inplacef90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
49  # set_target_properties(nonblockingf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
50  # set_target_properties(nonblocking_inpf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
51   set_target_properties(red_scat_blockf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
52   set_target_properties(redscatf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
53   set_target_properties(reducelocalf90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
54   set_target_properties(split_typef90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
55   set_target_properties(uallreducef90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
56   set_target_properties(vw_inplacef90 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
57
58 endif()
59
60 set(tesh_files
61   ${tesh_files}
62   PARENT_SCOPE
63   )
64 set(xml_files
65   ${xml_files}
66   PARENT_SCOPE
67   )
68 set(examples_src
69   ${examples_src}
70   ${CMAKE_CURRENT_SOURCE_DIR}/allredint8f90.f90
71   ${CMAKE_CURRENT_SOURCE_DIR}/allredopttf90.f90
72   ${CMAKE_CURRENT_SOURCE_DIR}/alltoallvf90.f90
73   ${CMAKE_CURRENT_SOURCE_DIR}/alltoallwf90.f90
74   ${CMAKE_CURRENT_SOURCE_DIR}/exscanf90.f90
75   ${CMAKE_CURRENT_SOURCE_DIR}/inplacef90.f90
76   ${CMAKE_CURRENT_SOURCE_DIR}/nonblockingf90.f90
77   ${CMAKE_CURRENT_SOURCE_DIR}/nonblocking_inpf90.f90
78   ${CMAKE_CURRENT_SOURCE_DIR}/red_scat_blockf90.f90
79   ${CMAKE_CURRENT_SOURCE_DIR}/redscatf90.f90
80   ${CMAKE_CURRENT_SOURCE_DIR}/reducelocalf90.f90
81   ${CMAKE_CURRENT_SOURCE_DIR}/split_typef90.f90
82   ${CMAKE_CURRENT_SOURCE_DIR}/uallreducef90.f90
83   ${CMAKE_CURRENT_SOURCE_DIR}/vw_inplacef90.f90
84   PARENT_SCOPE
85   )
86 set(bin_files
87   ${bin_files}
88   PARENT_SCOPE
89   )
90 set(txt_files
91   ${txt_files}
92   ${CMAKE_CURRENT_SOURCE_DIR}/../util/mtestf90.f90
93   ${CMAKE_CURRENT_SOURCE_DIR}/testlist
94   PARENT_SCOPE
95   )