Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add fortran tests from mpich-tests, enforce completion of mpich-tests suite with...
[simgrid.git] / teshsuite / smpi / mpich-test / coll / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(enable_smpi)
4   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
5   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/bin/smpiff")
6   set(CMAKE_Fortran_LINKER "${CMAKE_BINARY_DIR}/bin/smpicc")
7   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
8   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")
9
10   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
11   
12   add_executable(coll1 coll1.c test.c)
13   add_executable(coll2 coll2.c test.c)
14   add_executable(coll3 coll3.c test.c)
15   add_executable(coll4 coll4.c test.c)
16   add_executable(coll5 coll5.c test.c)
17   add_executable(coll6 coll6.c test.c)
18   add_executable(coll7 coll7.c test.c)
19   add_executable(coll8 coll8.c test.c)
20   add_executable(coll9 coll9.c test.c)
21   add_executable(coll10 coll10.c test.c)
22   add_executable(coll11 coll11.c test.c)
23   add_executable(coll12 coll12.c test.c)
24   add_executable(coll13 coll13.c)
25   add_executable(allredmany allredmany.c)
26   add_executable(bcastbug2 bcastbug2.c test.c) 
27   add_executable(bcastbug bcastbug.c test.c)
28   add_executable(bcastvec bcastvec.c test.c )
29   add_executable(grouptest grouptest.c test.c)
30   add_executable(redtst redtst.c test.c)
31   add_executable(barrier barrier.c test.c)
32   add_executable(bcast_mpich bcast.c test.c)
33   add_executable(allred allred.c ../pt2pt/gcomm.c)
34   add_executable(allred2 allred2.c ../pt2pt/gcomm.c)
35   add_executable(scatterv scatterv.c)
36   add_executable(scattern scattern.c)
37   add_executable(redscat redscat.c)
38   add_executable(alltoallv_mpich alltoallv.c)
39   add_executable(scantst scantst.c test.c)
40   add_executable(longuser longuser.c test.c)
41
42   if(SMPI_F2C)
43   add_executable(allredf allredf.f)
44   add_executable(assocf assocf.f)
45   add_executable(allgatherf allgatherf.f)
46   add_executable(bcastlog bcastlog.f)
47   endif(SMPI_F2C)
48
49   target_link_libraries(coll1  m simgrid smpi )
50   target_link_libraries(coll2 m simgrid smpi )
51   target_link_libraries(coll3 m simgrid smpi )
52   target_link_libraries(coll4 m simgrid smpi )
53   target_link_libraries(coll5 m simgrid smpi )
54   target_link_libraries(coll6 m simgrid smpi )
55   target_link_libraries(coll7 m simgrid smpi )
56   target_link_libraries(coll8 m simgrid smpi )
57   target_link_libraries(coll9 m simgrid smpi )
58   target_link_libraries(coll10 m simgrid smpi )
59   target_link_libraries(coll11 m simgrid smpi )
60   target_link_libraries(coll12  m simgrid smpi )
61   target_link_libraries(coll13 m simgrid smpi )
62   target_link_libraries(allredmany m simgrid smpi )
63   target_link_libraries(bcastbug m simgrid smpi )
64   target_link_libraries(bcastbug2 m simgrid smpi )
65   target_link_libraries(bcastvec m simgrid smpi )
66   target_link_libraries(grouptest m simgrid smpi )
67   target_link_libraries(redtst m simgrid smpi )
68   target_link_libraries(barrier m simgrid smpi )
69   target_link_libraries(bcast_mpich m simgrid smpi )
70   target_link_libraries(allred m simgrid smpi )
71   target_link_libraries(allred2 m simgrid smpi )
72   target_link_libraries(scatterv m simgrid smpi )
73   target_link_libraries(scattern m simgrid smpi )
74   target_link_libraries(redscat m simgrid smpi )
75   target_link_libraries(longuser m simgrid smpi )
76   target_link_libraries(alltoallv_mpich m simgrid smpi )
77   target_link_libraries(scantst m simgrid smpi )
78   if(SMPI_F2C)
79   target_link_libraries(allredf m simgrid smpi )
80   target_link_libraries(assocf m simgrid smpi )
81   target_link_libraries(allgatherf m simgrid smpi )
82   target_link_libraries(bcastlog m simgrid smpi )
83   endif(SMPI_F2C)
84
85   set_target_properties(coll1 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
86   set_target_properties(coll2 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
87   set_target_properties(coll3 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
88   set_target_properties(coll4 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
89   set_target_properties(coll5 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
90   set_target_properties(coll6 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
91   set_target_properties(coll7 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
92   set_target_properties(coll8 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
93   set_target_properties(coll9 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
94   set_target_properties(coll10 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
95   set_target_properties(coll11 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
96   set_target_properties(coll12 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
97   set_target_properties(coll13 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
98   set_target_properties(allredmany PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
99   set_target_properties(bcastbug PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
100   set_target_properties(bcastbug2 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
101   set_target_properties(bcastvec PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
102   set_target_properties(grouptest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
103   set_target_properties(redtst PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
104   set_target_properties(barrier PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
105   set_target_properties(bcast_mpich PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
106   set_target_properties(allred PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
107   set_target_properties(allred2 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
108   set_target_properties(scatterv PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
109   set_target_properties(scattern PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
110   set_target_properties(redscat PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
111   set_target_properties(longuser PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
112   set_target_properties(alltoallv_mpich PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
113   set_target_properties(scantst PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
114   if(SMPI_F2C)
115   set_target_properties(allredf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
116   set_target_properties(assocf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
117   set_target_properties(allgatherf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
118   set_target_properties(bcastlog PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
119   endif(SMPI_F2C)
120
121 endif(enable_smpi)
122
123 set(tesh_files
124   ${tesh_files}
125   ${CMAKE_CURRENT_SOURCE_DIR}/coll.tesh
126   PARENT_SCOPE
127   )
128 set(xml_files
129   ${xml_files}
130   PARENT_SCOPE
131   )
132 set(examples_src
133   ${examples_src}
134   ${CMAKE_CURRENT_SOURCE_DIR}/coll1 .c
135   ${CMAKE_CURRENT_SOURCE_DIR}/coll2.c
136   ${CMAKE_CURRENT_SOURCE_DIR}/coll3.c
137   ${CMAKE_CURRENT_SOURCE_DIR}/coll4.c
138   ${CMAKE_CURRENT_SOURCE_DIR}/coll5.c
139   ${CMAKE_CURRENT_SOURCE_DIR}/coll6.c
140   ${CMAKE_CURRENT_SOURCE_DIR}/coll7.c
141   ${CMAKE_CURRENT_SOURCE_DIR}/coll8.c
142   ${CMAKE_CURRENT_SOURCE_DIR}/coll9.c
143   ${CMAKE_CURRENT_SOURCE_DIR}/coll10.c
144   ${CMAKE_CURRENT_SOURCE_DIR}/coll11.c
145   ${CMAKE_CURRENT_SOURCE_DIR}/coll12 .c
146   ${CMAKE_CURRENT_SOURCE_DIR}/coll13.c
147   ${CMAKE_CURRENT_SOURCE_DIR}/allredmany.c
148   ${CMAKE_CURRENT_SOURCE_DIR}/bcastbug.c
149   ${CMAKE_CURRENT_SOURCE_DIR}/bcastbug2.c
150   ${CMAKE_CURRENT_SOURCE_DIR}/bcastvec.c
151   ${CMAKE_CURRENT_SOURCE_DIR}/grouptest.c
152   ${CMAKE_CURRENT_SOURCE_DIR}/redtst.c
153   ${CMAKE_CURRENT_SOURCE_DIR}/barrier.c
154   ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c
155   ${CMAKE_CURRENT_SOURCE_DIR}/allred.c
156   ${CMAKE_CURRENT_SOURCE_DIR}/allred2.c
157   ${CMAKE_CURRENT_SOURCE_DIR}/scatterv.c
158   ${CMAKE_CURRENT_SOURCE_DIR}/scattern.c
159   ${CMAKE_CURRENT_SOURCE_DIR}/redscat.c
160   ${CMAKE_CURRENT_SOURCE_DIR}/longuser.c
161   ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c
162   ${CMAKE_CURRENT_SOURCE_DIR}/scantst.c
163   ${CMAKE_CURRENT_SOURCE_DIR}/test.c
164   ${CMAKE_CURRENT_SOURCE_DIR}/test.h
165   ${CMAKE_CURRENT_SOURCE_DIR}/allgatherf.f
166   ${CMAKE_CURRENT_SOURCE_DIR}/allredf.f
167   ${CMAKE_CURRENT_SOURCE_DIR}/allredf.std
168   ${CMAKE_CURRENT_SOURCE_DIR}/assocf.f
169   ${CMAKE_CURRENT_SOURCE_DIR}/bcastlog.f
170
171   PARENT_SCOPE
172   )
173 set(bin_files
174   ${bin_files}
175   ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile
176   PARENT_SCOPE
177   )
178 set(txt_files
179   ${txt_files}
180   PARENT_SCOPE
181   )