Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Supernovae mode with cmake.
[simgrid.git] / buildtools / CPACK / src / CMakeSupernovae.txt
1 ### Make supernovae files and libs
2
3 set(simgrid_fragile_sources 
4 ${PROJECT_DIRECTORY}/src/gras/DataDesc/ddt_parse.yy.c
5 ${PROJECT_DIRECTORY}/src/surf/surfxml_parse.c
6 ${PROJECT_DIRECTORY}/src/xbt/graphxml_parse.c
7 ${PROJECT_DIRECTORY}/src/simdag/sd_daxloader.c
8 )
9 set(gras_fragile_sources
10 ${PROJECT_DIRECTORY}/src/gras/DataDesc/ddt_parse.yy.c
11 ${PROJECT_DIRECTORY}/src/xbt/graphxml_parse.c
12 )
13 set(temp_src_smpi "")
14 set(temp_src_simgrid "")
15 set(temp_src_gras "")
16
17 foreach(file ${SMPI_SRC})
18 set(temp_src_smpi "${temp_src_smpi} ${file}")
19 endforeach(file ${SMPI_SRC})
20
21 foreach(file ${simgrid_sources})
22         set(en_plus yes)
23         foreach(file_delete ${simgrid_fragile_sources})
24                 if(file_delete MATCHES "${file}")
25                         set(en_plus no)
26                         #message("${file}")
27                 endif(file_delete MATCHES "${file}")
28         endforeach (file_delete ${simgrid_fragile_sources})
29         if(en_plus)
30                 if(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
31                         set(file "xbt/log.c")
32                 endif(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
33                 set(temp_src_simgrid "${temp_src_simgrid} ${file}")
34         endif(en_plus)
35 endforeach(file ${simgrid_sources})
36
37 foreach(file ${gras_sources})
38         set(en_plus yes)
39         foreach(file_delete ${gras_fragile_sources})
40                 if(file_delete MATCHES "${file}")
41                         set(en_plus no)
42                         #message("${file}")
43                 endif(file_delete MATCHES "${file}")
44         endforeach (file_delete ${gras_fragile_sources})
45         if(en_plus)
46                 if(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
47                         set(file "xbt/log.c")
48                 endif(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
49                 set(temp_src_gras "${temp_src_gras} ${file}")
50         endif(en_plus)
51 endforeach(file ${gras_sources})
52
53 #message("simgrid : \n${temp_src_simgrid}")
54 #message("gras : \n${temp_src_gras}")
55 #message("smpi : \n${temp_src_smpi}")
56
57 exec_program("rm ${PROJECT_DIRECTORY}/src/supernovae_sg.c ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${PROJECT_DIRECTORY}/src/supernovae_smpi.c"OUTPUT_VARIABLE "SUPER_OK")
58
59 exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_sg.c   ${temp_src_simgrid}" OUTPUT_VARIABLE "SUPER_OK")
60 exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${temp_src_gras}"    OUTPUT_VARIABLE "SUPER_OK")
61 exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_smpi.c ${temp_src_smpi}"    OUTPUT_VARIABLE "SUPER_OK")
62
63 add_library(simgrid     SHARED  ${PROJECT_DIRECTORY}/src/supernovae_sg.c ${simgrid_fragile_sources})
64 add_library(gras        SHARED  ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${gras_fragile_sources})
65 add_library(smpi        SHARED  ${PROJECT_DIRECTORY}/src/supernovae_smpi.c)