Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This is better for regex ... sorry
[simgrid.git] / teshsuite / smpi / mpich-test / CMakeLists.txt
index a743421..a58e2bc 100644 (file)
@@ -1,64 +1,5 @@
-cmake_minimum_required(VERSION 2.6)
-
-if(enable_smpi)
-  set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
-
-  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
-  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
-
-  add_executable(alltoall2 alltoall2.c )
-  add_executable(alltoall_basic alltoall_basic.c)
-  add_executable(alltoallv alltoallv.c)
-  add_executable(allreduce allreduce.c)
-  add_executable(bcast bcast.c)
-  add_executable(compute compute.c)
-  add_executable(compute2 compute2.c)
-  add_executable(compute3 compute3.c)
-  add_executable(pingpong pingpong.c)
-  add_executable(scatter scatter.c)
-  add_executable(reduce reduce.c)
-  add_executable(split split.c)
-  add_executable(dsend dsend.c)
-  add_executable(smpi_sendrecv sendrecv.c)
-  add_executable(ttest01 ttest01.c)
-  add_executable(vector_test vector_test.c)
-  add_executable(hvector_test hvector_test.c)
-  add_executable(indexed_test indexed_test.c)
-  add_executable(struct_test struct_test.c)
-
-  target_link_libraries(alltoall2 m simgrid smpi )
-  target_link_libraries(alltoall_basic m simgrid smpi )
-  target_link_libraries(alltoallv m simgrid smpi )
-  target_link_libraries(allreduce m simgrid smpi )
-  target_link_libraries(bcast m simgrid smpi )
-  target_link_libraries(compute m simgrid smpi )
-  target_link_libraries(compute2 m simgrid smpi )
-  target_link_libraries(compute3 m simgrid smpi )
-  target_link_libraries(pingpong m simgrid smpi )
-  target_link_libraries(scatter m simgrid smpi )
-  target_link_libraries(reduce m simgrid smpi )
-  target_link_libraries(split m simgrid smpi )
-  target_link_libraries(dsend m simgrid smpi )
-  target_link_libraries(smpi_sendrecv m simgrid smpi )
-  target_link_libraries(ttest01 m simgrid smpi )
-  target_link_libraries(vector_test m simgrid smpi )
-  target_link_libraries(hvector_test m simgrid smpi )
-  target_link_libraries(indexed_test m simgrid smpi )
-  target_link_libraries(struct_test m simgrid smpi )
-
-  set_target_properties(smpi_sendrecv PROPERTIES RENAME sendrecv)
-endif(enable_smpi)
-
 set(tesh_files
   ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/hvector.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/indexed.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/struct.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/vector.tesh  
   PARENT_SCOPE
   )
 set(xml_files
@@ -67,36 +8,66 @@ set(xml_files
   )
 set(examples_src
   ${examples_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoallv.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/get_processor_name.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/bcast.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/allreduce.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall_basic.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/sendrecv.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/reduce.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute2.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/split.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/dsend.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/ttest01.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/compute3.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/alltoall2.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/scatter.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/sendtest.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/barrier.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/vector_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/hvector_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/indexed_test.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/struct_test.c
   PARENT_SCOPE
   )
 set(bin_files
   ${bin_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
   PARENT_SCOPE
   )
+  
+set(stdo_std_smpi
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/context/attrt.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/context/attrerr.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/context/context.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/context/commnames.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/self.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/sndrcvrep.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/waitany.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/reqcreate.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/persistent.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/allpair2.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/typeub3.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/waitall.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/nullproc2.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/allpair.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/hindexed.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/ssendtest2.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/sendmany.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/nullproc.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/nbtest.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/sendcplx.stdo
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/hvec.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/typebase.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/typeub2.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/structf.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/typecreate.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/pt2pt/nblock.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/topol/cartmap.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/topol/graphtest.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/topol/cartf.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/env/aborttest.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/env/errstringsf.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/env/env.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/profile/ptest.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/coll/allredmany.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/coll/allredf.std
+  ${CMAKE_CURRENT_SOURCE_DIR}/mpich-test/coll/scatterv.std
+)
+
+if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
+else()
+    foreach(srcfile ${stdo_std_smpi})
+        set(dstfile ${srcfile})
+        string(REPLACE "${CMAKE_HOME_DIRECTORY}" "${CMAKE_BINARY_DIR}" dstfile "${dstfile}")
+        string(REGEX REPLACE "/[^/]*.std" "/" dstfile "${dstfile}")
+        string(REGEX REPLACE "/[^/]*.stdo" "/" dstfile "${dstfile}")
+        #message("copy ${srcfile} to ${dstfile}")
+        file(COPY ${srcfile} DESTINATION ${dstfile})
+    endforeach()
+endif()
+
 set(txt_files
   ${txt_files}
+  ${stdo_std_smpi}
   PARENT_SCOPE
   )