Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Supernovae mode with cmake.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 10 Feb 2010 12:50:17 +0000 (12:50 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 10 Feb 2010 12:50:17 +0000 (12:50 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7074 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/CPACK/src/CMakeMakeExeLib.txt
buildtools/CPACK/src/CMakeOption.txt
buildtools/CPACK/src/CMakePrintArgs.txt
buildtools/CPACK/src/CMakeSupernovae.txt [new file with mode: 0644]

index eac42f1..6117a6e 100644 (file)
@@ -2,9 +2,13 @@
 
 include(${PROJECT_DIRECTORY}/CPACK/src/CMakeFLEXml.txt)
 
-add_library(simgrid SHARED ${simgrid_sources})
-add_library(gras SHARED ${gras_sources})
-add_library(smpi SHARED ${SMPI_SRC})
+if(supernovae)
+       include(${PROJECT_DIRECTORY}/CPACK/src/CMakeSupernovae.txt)
+else(supernovae)
+       add_library(simgrid SHARED ${simgrid_sources})
+       add_library(gras SHARED ${gras_sources})
+       add_library(smpi SHARED ${SMPI_SRC})
+endif(supernovae)
 
 set(GRAS_DEP "pthread")
 set(SIMGRID_DEP "")
index 87e415c..32e970a 100644 (file)
@@ -10,6 +10,7 @@
 
 option(init "Set ON for make _*.c with gras_stub_generator" OFF)
 option(MAINTAINER_MODE "Permit to make flex and flexml files." OFF)
+option(supernovae "Supernovae mode." OFF)
 option(disable_java "This variable set the java context." ON)
 option(disable_gtnets "This variable set the gtnets context." ON)
 option(disable_context "This variable set the context." ON)
index d34db93..de14587 100644 (file)
@@ -1,5 +1,6 @@
 message("\n________ARGS_________")
 message("init ${init}")
+message("supernovae ${supernovae}")
 message("MAINTAINER_MODE ${MAINTAINER_MODE}")
 message("disable_java ${disable_java}")
 message("disable_lua ${disable_lua}")
diff --git a/buildtools/CPACK/src/CMakeSupernovae.txt b/buildtools/CPACK/src/CMakeSupernovae.txt
new file mode 100644 (file)
index 0000000..b46187c
--- /dev/null
@@ -0,0 +1,65 @@
+### Make supernovae files and libs
+
+set(simgrid_fragile_sources 
+${PROJECT_DIRECTORY}/src/gras/DataDesc/ddt_parse.yy.c
+${PROJECT_DIRECTORY}/src/surf/surfxml_parse.c
+${PROJECT_DIRECTORY}/src/xbt/graphxml_parse.c
+${PROJECT_DIRECTORY}/src/simdag/sd_daxloader.c
+)
+set(gras_fragile_sources
+${PROJECT_DIRECTORY}/src/gras/DataDesc/ddt_parse.yy.c
+${PROJECT_DIRECTORY}/src/xbt/graphxml_parse.c
+)
+set(temp_src_smpi "")
+set(temp_src_simgrid "")
+set(temp_src_gras "")
+
+foreach(file ${SMPI_SRC})
+set(temp_src_smpi "${temp_src_smpi} ${file}")
+endforeach(file ${SMPI_SRC})
+
+foreach(file ${simgrid_sources})
+       set(en_plus yes)
+       foreach(file_delete ${simgrid_fragile_sources})
+               if(file_delete MATCHES "${file}")
+                       set(en_plus no)
+                       #message("${file}")
+               endif(file_delete MATCHES "${file}")
+       endforeach (file_delete ${simgrid_fragile_sources})
+       if(en_plus)
+               if(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
+                       set(file "xbt/log.c")
+               endif(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
+               set(temp_src_simgrid "${temp_src_simgrid} ${file}")
+       endif(en_plus)
+endforeach(file ${simgrid_sources})
+
+foreach(file ${gras_sources})
+       set(en_plus yes)
+       foreach(file_delete ${gras_fragile_sources})
+               if(file_delete MATCHES "${file}")
+                       set(en_plus no)
+                       #message("${file}")
+               endif(file_delete MATCHES "${file}")
+       endforeach (file_delete ${gras_fragile_sources})
+       if(en_plus)
+               if(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
+                       set(file "xbt/log.c")
+               endif(file MATCHES "/home/navarrop/Bureau/simgrid-trunk/src/xbt/log.c")
+               set(temp_src_gras "${temp_src_gras} ${file}")
+       endif(en_plus)
+endforeach(file ${gras_sources})
+
+#message("simgrid : \n${temp_src_simgrid}")
+#message("gras : \n${temp_src_gras}")
+#message("smpi : \n${temp_src_smpi}")
+
+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")
+
+exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_sg.c   ${temp_src_simgrid}" OUTPUT_VARIABLE "SUPER_OK")
+exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${temp_src_gras}"   OUTPUT_VARIABLE "SUPER_OK")
+exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_smpi.c ${temp_src_smpi}"   OUTPUT_VARIABLE "SUPER_OK")
+
+add_library(simgrid    SHARED  ${PROJECT_DIRECTORY}/src/supernovae_sg.c ${simgrid_fragile_sources})
+add_library(gras       SHARED  ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${gras_fragile_sources})
+add_library(smpi       SHARED  ${PROJECT_DIRECTORY}/src/supernovae_smpi.c)