Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove conditions from else() and endif() in cmake file.
[simgrid.git] / teshsuite / smpi / mpich-test / env / 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
8   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
9   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")
10
11   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
12   
13   add_executable(init init.c )
14   add_executable(timers timers.c test.c)
15   add_executable(timertest timertest.c test.c)
16   add_executable(baseattr baseattr.c test.c)
17   add_executable(gtime gtime.c test.c)
18   add_executable(errhand errhand.c test.c)
19   add_executable(sigchk sigchk.c test.c)
20   add_executable(aborttest aborttest.c)
21   add_executable(testerr testerr.c)
22   add_executable(getproc getproc.c)
23   if(SMPI_F2C)
24 #  add_executable(baseattrf baseattrf.f)
25 #  add_executable(errhandf errhandf.f)
26 #  add_executable(errstringsf errstringsf.f)
27   add_executable(getprocf getprocf.f)
28   endif()
29   target_link_libraries(init m simgrid smpi )
30   target_link_libraries(timers m simgrid smpi )
31   target_link_libraries(timertest m simgrid smpi )
32   target_link_libraries(baseattr m simgrid smpi )
33   target_link_libraries(gtime m simgrid smpi )
34   target_link_libraries(errhand m simgrid smpi )
35   target_link_libraries(sigchk m simgrid smpi )
36   target_link_libraries(aborttest m simgrid smpi )
37   target_link_libraries(testerr m simgrid smpi )
38   target_link_libraries(getproc m simgrid smpi )
39   if(SMPI_F2C)
40 #  target_link_libraries(baseattrf m simgrid smpi )
41 #  target_link_libraries(errhandf m simgrid smpi )
42 #  target_link_libraries(errstringsf m simgrid smpi )
43   target_link_libraries(getprocf m simgrid smpi )
44   endif()
45
46   set_target_properties(timers PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
47   set_target_properties(timers PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
48   set_target_properties(timertest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
49   set_target_properties(baseattr PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
50   set_target_properties(gtime PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
51   set_target_properties(errhand PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
52   set_target_properties(sigchk PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
53   set_target_properties(aborttest PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
54   set_target_properties(testerr PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
55   set_target_properties(getproc PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
56   if(SMPI_F2C)
57 #  set_target_properties(baseattrf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
58 #  set_target_properties(errhandf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
59 #  set_target_properties(errstringsf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
60   set_target_properties(getprocf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
61   endif()
62 endif()
63
64 set(tesh_files
65   ${tesh_files}
66   ${CMAKE_CURRENT_SOURCE_DIR}/env.tesh
67   PARENT_SCOPE
68   )
69 set(xml_files
70   ${xml_files}
71   PARENT_SCOPE
72   )
73 set(examples_src
74   ${examples_src}
75   ${CMAKE_CURRENT_SOURCE_DIR}/test.c
76   ${CMAKE_CURRENT_SOURCE_DIR}/init.c
77   ${CMAKE_CURRENT_SOURCE_DIR}/timers.c
78   ${CMAKE_CURRENT_SOURCE_DIR}/baseattr.c
79   ${CMAKE_CURRENT_SOURCE_DIR}/gtime.c
80   ${CMAKE_CURRENT_SOURCE_DIR}/errhand.c
81   ${CMAKE_CURRENT_SOURCE_DIR}/sigchk.c
82   ${CMAKE_CURRENT_SOURCE_DIR}/aborttest.c
83   ${CMAKE_CURRENT_SOURCE_DIR}/testerr.c
84   ${CMAKE_CURRENT_SOURCE_DIR}/getproc.c
85   ${CMAKE_CURRENT_SOURCE_DIR}/test.h
86   PARENT_SCOPE
87   )
88 set(bin_files
89   ${bin_files}
90   ${CMAKE_CURRENT_SOURCE_DIR}/../hostfile
91   PARENT_SCOPE
92   )
93 set(txt_files
94   ${txt_files}
95   PARENT_SCOPE
96   )