Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add option enable smpi which is on by default.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 09:59:15 +0000 (09:59 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 4 May 2010 09:59:15 +0000 (09:59 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7669 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/src/CMakeMakeExeLib.txt
buildtools/Cmake/src/CMakeOption.txt
buildtools/Cmake/src/CMakePrintArgs.txt
buildtools/Cmake/src/CMakeSupernovae.txt
buildtools/Cmake/src/CMakeTest.txt

index 628da289a93f3f166d0a2dbae95ba3925a63174b..31be6d6965972db8a8028d9708a1e49bc1785d90 100644 (file)
@@ -6,12 +6,17 @@ else(enable_supernovae)
        add_library(simgrid SHARED ${simgrid_sources})
        add_library(simgrid_static STATIC ${simgrid_sources})
        add_library(gras SHARED ${gras_sources})
-       add_library(smpi SHARED ${SMPI_SRC})
+       if(enable_smpi)
+               add_library(smpi SHARED ${SMPI_SRC})
+       endif(enable_smpi)
 endif(enable_supernovae)
 
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})
-set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version})
+if(enable_smpi)
+       set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version})
+endif(enable_smpi)
+
 
 set(GRAS_DEP "-lm -lpthread")
 set(SIMGRID_DEP "-lm")
@@ -54,7 +59,10 @@ endif(HAVE_POSIX_GETTIME)
 target_link_libraries(simgrid  ${SIMGRID_DEP} -fprofile-arcs)
 target_link_libraries(simgrid_static   ${SIMGRID_DEP} -fprofile-arcs)
 target_link_libraries(gras     ${GRAS_DEP} -fprofile-arcs)
-target_link_libraries(smpi     simgrid ${SMPI_DEP} -fprofile-arcs)
+if(enable_smpi)
+       target_link_libraries(smpi      simgrid ${SMPI_DEP} -fprofile-arcs)
+endif(enable_smpi)
+
 
 #SET_TARGET_PROPERTIES(simgrid_static PROPERTIES OUTPUT_NAME "simgrid")
 #SET_TARGET_PROPERTIES(simgrid_static PROPERTIES PREFIX "lib")
@@ -129,7 +137,9 @@ add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dax)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/metaxml)
 add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/properties)
-add_subdirectory(${PROJECT_DIRECTORY}/examples/smpi)
+if(enable_smpi)
+       add_subdirectory(${PROJECT_DIRECTORY}/examples/smpi)
+endif(enable_smpi)
 
 set(targets_depended_of_gras_stub_generator
 ping_client
index df9a68bf72ba3685e47d8aff29a0fed0c5d4bf66..1c5f4359a95072d9fa1b76cb2b66603a1e1d0abd 100644 (file)
@@ -10,6 +10,7 @@ if(NOT with_context)
        set(with_context "auto" CACHE TYPE INTERNAL FORCE)
 endif(NOT with_context)
 
+option(enable_smpi "This variable set smpi lib." on)
 option(enable_gtnets "This variable set the gtnets context." on)
 option(enable_java "This variable set the java context." off)
 option(enable_lua "This variable set lua use." on)
index 3fdb623cc5898efdb69018cd8ef176de0588c7cb..0d3f76dc0660ccc095e79978a5c6640799d6ec0f 100644 (file)
@@ -107,6 +107,7 @@ message("   Compile Java   :        ${HAVE_JAVA}")
 message("      Compile Lua    :        ${HAVE_LUA}")
 message("      Compile Ruby   :        ${HAVE_RUBY}")
 message("")
+message("      Compile Smpi   :        ${enable_smpi}")
 message("      Maintainer mode:        ${enable_maintainer_mode}")
 message("      Supernovae mode:        ${enable_supernovae}")
 message("      Tracing mode   :        ${enable_tracing}")
index 562cea63939d971ed35d88317b0b4a6f568b7cdb..56a485238f64d3cd333ebde82478dedad89c3c4f 100644 (file)
@@ -14,9 +14,11 @@ 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})
+if(enable_smpi)
+       foreach(file ${SMPI_SRC})
+               set(temp_src_smpi "${temp_src_smpi} ${file}")
+       endforeach(file ${SMPI_SRC})
+endif(enable_smpi)
 
 foreach(file ${simgrid_sources})
        set(en_plus yes)
@@ -50,17 +52,18 @@ foreach(file ${gras_sources})
        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("chmod a=rwx ${PROJECT_DIRECTORY}/src/mk_supernovae.sh" 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")
+if(enable_smpi)
+       exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src/supernovae_smpi.c ${temp_src_smpi}"    OUTPUT_VARIABLE "SUPER_OK")
+endif(enable_smpi)
 
 add_library(simgrid    SHARED  ${PROJECT_DIRECTORY}/src/supernovae_sg.c ${simgrid_fragile_sources})
 add_library(simgrid_static STATIC ${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)
+if(enable_smpi)
+       add_library(smpi        SHARED  ${PROJECT_DIRECTORY}/src/supernovae_smpi.c)
+endif(enable_smpi)
+
index c439373e20070731de9d03f8d04e33062fe17a6b..27453332efdbf8418ade818223baeb24976dd419 100644 (file)
@@ -1,8 +1,9 @@
 ### Be sure we can execut some launch file
 exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/buildtools/Cmake/test_java.sh" OUTPUT_VARIABLE "OKITOKI")
-exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpicc" OUTPUT_VARIABLE "OKITOKI")
-exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpirun" OUTPUT_VARIABLE "OKITOKI")
-
+if(enable_smpi)
+       exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpicc" OUTPUT_VARIABLE "OKITOKI")
+       exec_program("chmod a=rwx ${PROJECT_DIRECTORY}/src/smpi/smpirun" OUTPUT_VARIABLE "OKITOKI")
+endif(enable_smpi)
 ### For code coverage
 ### Set some variables
 SET(UPDATE_TYPE "svn")
@@ -183,9 +184,11 @@ ADD_TEST(simdag-test_simdag2       ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT
 ADD_TEST(simdag-test_prop      ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag properties/test_prop.tesh)
 ADD_TEST(simdag-metaxml_test   ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/simdag metaxml/metaxml_test.tesh)
 
+if(enable_smpi)
 # smpi examples
 ADD_TEST(smpi-bcast    ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/smpi bcast.tesh)
 ADD_TEST(smpi-reduce   ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/smpi reduce.tesh)
+endif(enable_smpi)
 
 if(HAVE_GTNETS)
 ADD_TEST(msg-gtnets-waxman     ${PROJECT_DIRECTORY}/tools/tesh/tesh --cd ${PROJECT_DIRECTORY}/examples/msg gtnets/gtnets-waxman.tesh)