Logo AND Algorithmique Numérique Distribuée

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