Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
e9f13270d427e16757df92fc496def3679c0eb41
[simgrid.git] / teshsuite / smpi / mpich-test / context / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(enable_smpi)
4   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
5   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
6   set(CMAKE_Fortran_LINKER "${CMAKE_BINARY_DIR}/smpi_script/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(attrerr attrerr.c test.c)
13  # add_executable(attrt attrt.c test.c)
14  # add_executable(commnames commnames.c)
15   add_executable(groupcreate groupcreate.c)
16   add_executable(grouptest_mpich grouptest.c)
17   add_executable(icdup icdup.c)
18   add_executable(ictest ictest.c )
19   add_executable(ictest2 ictest2.c)
20   add_executable(ictest3 ictest3.c)
21   
22   if(SMPI_F2C)
23   #add_executable(attrtest_f attrtest.f)
24   #add_executable(commnames_f commnamesf.f)
25   endif(SMPI_F2C)
26
27   target_link_libraries(attrerr m simgrid smpi )
28  # target_link_libraries(attrt m simgrid smpi )
29  # target_link_libraries(commnames m simgrid smpi )
30   target_link_libraries(groupcreate m simgrid smpi )
31   target_link_libraries(grouptest_mpich m simgrid smpi )
32   target_link_libraries(icdup m simgrid smpi )
33   target_link_libraries(ictest m simgrid smpi )
34   target_link_libraries(ictest2 m simgrid smpi )
35   target_link_libraries(ictest3 m simgrid smpi )
36
37   if(SMPI_F2C)
38   #target_link_libraries(attrtest_f m simgrid smpi f2c)
39   #target_link_libraries(commnames_f m simgrid smpi f2c)
40   endif(SMPI_F2C)
41   
42   set_target_properties(attrerr PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
43  # set_target_properties(attrt PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
44  # set_target_properties(commnames PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
45   set_target_properties(groupcreate PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
46   set_target_properties(grouptest_mpich PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
47   set_target_properties(icdup PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
48   set_target_properties(ictest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
49   set_target_properties(ictest2 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
50   set_target_properties(ictest3 PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
51  
52  
53    if(SMPI_F2C)
54   #set_target_properties(commnames_f PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}" )
55   #set_target_properties(attrtest_f PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}"  )
56   endif(SMPI_F2C)
57
58 endif(enable_smpi)
59
60 set(tesh_files
61   ${tesh_files}
62   ${CMAKE_CURRENT_SOURCE_DIR}/context.tesh
63   PARENT_SCOPE
64   )
65 set(xml_files
66   ${xml_files}
67   PARENT_SCOPE
68   )
69 set(examples_src
70   ${examples_src}
71   ${CMAKE_CURRENT_SOURCE_DIR}/test.c
72   ${CMAKE_CURRENT_SOURCE_DIR}/attrerr.c
73  # ${CMAKE_CURRENT_SOURCE_DIR}/attrt.c
74  # ${CMAKE_CURRENT_SOURCE_DIR}/commnames.c
75   ${CMAKE_CURRENT_SOURCE_DIR}/groupcreate.c
76   ${CMAKE_CURRENT_SOURCE_DIR}/grouptest.c
77   ${CMAKE_CURRENT_SOURCE_DIR}/icdup.c
78   ${CMAKE_CURRENT_SOURCE_DIR}/ictest.c
79   ${CMAKE_CURRENT_SOURCE_DIR}/ictest2.c
80   ${CMAKE_CURRENT_SOURCE_DIR}/ictest3.c
81   ${CMAKE_CURRENT_SOURCE_DIR}/attrtest.f
82   ${CMAKE_CURRENT_SOURCE_DIR}/commnamesf.f
83   ${CMAKE_CURRENT_SOURCE_DIR}/test.h
84   PARENT_SCOPE
85   )
86 set(bin_files
87   ${bin_files}
88   ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile
89   PARENT_SCOPE
90   )
91 set(txt_files
92   ${txt_files}
93   PARENT_SCOPE
94   )