Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a81ab47b4d3bb798513f6a26588b1d0f00cc19a1
[simgrid.git] / teshsuite / smpi / mpich-test / env / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(enable_smpi)
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/smpiff")
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")
13
14   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
15   
16   add_executable(init init.c )
17   add_executable(timers timers.c test.c)
18   add_executable(timertest timertest.c test.c)
19   add_executable(baseattr baseattr.c test.c)
20   add_executable(gtime gtime.c test.c)
21   add_executable(errhand errhand.c test.c)
22   if(NOT WIN32)
23     add_executable(sigchk sigchk.c test.c)
24   endif()
25   add_executable(aborttest aborttest.c)
26   add_executable(testerr testerr.c)
27   add_executable(getproc getproc.c)
28   if(SMPI_F2C)
29 #    add_executable(baseattrf baseattrf.f)
30 #    add_executable(errhandf errhandf.f)
31 #    add_executable(errstringsf errstringsf.f)
32     add_executable(getprocf getprocf.f)
33   endif()
34   target_link_libraries(init simgrid smpi )
35   target_link_libraries(timers simgrid smpi )
36   target_link_libraries(timertest simgrid smpi )
37   target_link_libraries(baseattr simgrid smpi )
38   target_link_libraries(gtime simgrid smpi )
39   target_link_libraries(errhand simgrid smpi )
40   if(NOT WIN32)
41     target_link_libraries(sigchk simgrid smpi )
42   endif()
43         target_link_libraries(aborttest simgrid smpi )
44   target_link_libraries(testerr simgrid smpi )
45   target_link_libraries(getproc simgrid smpi )
46   if(SMPI_F2C)
47 #    target_link_libraries(baseattrf simgrid smpi )
48 #    target_link_libraries(errhandf simgrid smpi )
49 #    target_link_libraries(errstringsf simgrid smpi )
50     target_link_libraries(getprocf simgrid smpi )
51   endif()
52
53   set_target_properties(timers PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
54   set_target_properties(timers PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
55   set_target_properties(timertest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
56   set_target_properties(baseattr PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
57   set_target_properties(gtime PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
58   set_target_properties(errhand PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
59   if(NOT WIN32)
60     set_target_properties(sigchk PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
61   endif()
62   set_target_properties(aborttest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
63   set_target_properties(testerr PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
64   set_target_properties(getproc PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
65   if(SMPI_F2C)
66 #    set_target_properties(baseattrf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
67 #    set_target_properties(errhandf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
68 #    set_target_properties(errstringsf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
69     set_target_properties(getprocf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
70   endif()
71 endif()
72
73 set(tesh_files
74   ${tesh_files}
75   PARENT_SCOPE
76   )
77 set(xml_files
78   ${xml_files}
79   PARENT_SCOPE
80   )
81 set(examples_src
82   ${examples_src}
83   ${CMAKE_CURRENT_SOURCE_DIR}/test.c
84   ${CMAKE_CURRENT_SOURCE_DIR}/init.c
85   ${CMAKE_CURRENT_SOURCE_DIR}/timers.c
86   ${CMAKE_CURRENT_SOURCE_DIR}/timertest.c
87   ${CMAKE_CURRENT_SOURCE_DIR}/baseattr.c
88   ${CMAKE_CURRENT_SOURCE_DIR}/gtime.c
89   ${CMAKE_CURRENT_SOURCE_DIR}/errhand.c
90   ${CMAKE_CURRENT_SOURCE_DIR}/sigchk.c
91   ${CMAKE_CURRENT_SOURCE_DIR}/aborttest.c
92   ${CMAKE_CURRENT_SOURCE_DIR}/testerr.c
93   ${CMAKE_CURRENT_SOURCE_DIR}/getproc.c
94   ${CMAKE_CURRENT_SOURCE_DIR}/test.h
95   ${CMAKE_CURRENT_SOURCE_DIR}/baseattrf.f
96   ${CMAKE_CURRENT_SOURCE_DIR}/errhandf.f
97   ${CMAKE_CURRENT_SOURCE_DIR}/errstringsf.f
98   ${CMAKE_CURRENT_SOURCE_DIR}/getprocf.f
99   PARENT_SCOPE
100   )
101 set(bin_files
102   ${bin_files}
103   PARENT_SCOPE
104   )
105 set(txt_files
106   ${txt_files}
107   ${CMAKE_CURRENT_SOURCE_DIR}/runtests
108   ${CMAKE_CURRENT_SOURCE_DIR}/aborttest.std
109   ${CMAKE_CURRENT_SOURCE_DIR}/errstringsf.std
110   ${CMAKE_CURRENT_SOURCE_DIR}/env.std
111   PARENT_SCOPE
112   )