Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Java tests pass.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 2 Mar 2010 14:10:02 +0000 (14:10 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 2 Mar 2010 14:10:02 +0000 (14:10 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7166 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/CPACK/src/CMakeMakeExeLib.txt
buildtools/CPACK/src/CMakeSupernovae.txt
buildtools/CPACK/test_java.sh

index ce60cf6..7da989c 100644 (file)
@@ -3,17 +3,15 @@
 if(supernovae)
        include(${PROJECT_DIRECTORY}/CPACK/src/CMakeSupernovae.txt)
 else(supernovae)       
 if(supernovae)
        include(${PROJECT_DIRECTORY}/CPACK/src/CMakeSupernovae.txt)
 else(supernovae)       
-       add_library(simgrid STATIC ${simgrid_sources})
+       add_library(simgrid SHARED ${simgrid_sources})
        add_library(gras SHARED ${gras_sources})
        add_library(smpi STATIC ${SMPI_SRC})
 endif(supernovae)
 
        add_library(gras SHARED ${gras_sources})
        add_library(smpi STATIC ${SMPI_SRC})
 endif(supernovae)
 
-add_library(simgrid_ruby STATIC ${PROJECT_DIRECTORY}/src/bindings/ruby/simgrid_ruby.c)
-
 set(GRAS_DEP "pthread")
 set(SIMGRID_DEP "ruby1.8")
 set(SMPI_DEP "")
 set(GRAS_DEP "pthread")
 set(SIMGRID_DEP "ruby1.8")
 set(SMPI_DEP "")
-set(RUBY_DEP "-lm -module")
+
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        add_definitions("-D_XOPEN_SOURCE")
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        add_definitions("-D_XOPEN_SOURCE")
@@ -34,6 +32,12 @@ if(HAVE_LUA)
        SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -llua5.1")
 endif(HAVE_LUA)
 
        SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -llua5.1")
 endif(HAVE_LUA)
 
+if(HAVE_RUBY_H)
+add_library(simgrid_ruby STATIC ${PROJECT_DIRECTORY}/src/bindings/ruby/simgrid_ruby.c)
+set(RUBY_DEP "-lm -module")
+target_link_libraries(simgrid_ruby     simgrid ${RUBY_DEP} -fprofile-arcs)
+endif(HAVE_RUBY_H)
+
 if(HAVE_GTNETS)
        SET(SIMGRID_DEP "${SIMGRID_DEP} -lgtnets")
 endif(HAVE_GTNETS)
 if(HAVE_GTNETS)
        SET(SIMGRID_DEP "${SIMGRID_DEP} -lgtnets")
 endif(HAVE_GTNETS)
@@ -45,7 +49,6 @@ endif(NOT HAVE_RUBY_H)
 target_link_libraries(simgrid  ${SIMGRID_DEP} -fprofile-arcs)
 target_link_libraries(gras     ${GRAS_DEP} -fprofile-arcs)
 target_link_libraries(smpi     simgrid ${SMPI_DEP} -fprofile-arcs)
 target_link_libraries(simgrid  ${SIMGRID_DEP} -fprofile-arcs)
 target_link_libraries(gras     ${GRAS_DEP} -fprofile-arcs)
 target_link_libraries(smpi     simgrid ${SMPI_DEP} -fprofile-arcs)
-target_link_libraries(simgrid_ruby     simgrid ${RUBY_DEP} -fprofile-arcs)
 
 ### Make EXEs
 
 
 ### Make EXEs
 
index 350ec30..55eeaa4 100644 (file)
@@ -60,6 +60,6 @@ exec_program("${PROJECT_DIRECTORY}/src/mk_supernovae.sh ${PROJECT_DIRECTORY}/src
 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")
 
 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    STATIC  ${PROJECT_DIRECTORY}/src/supernovae_sg.c ${simgrid_fragile_sources})
+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       STATIC  ${PROJECT_DIRECTORY}/src/supernovae_smpi.c)
 add_library(gras       SHARED  ${PROJECT_DIRECTORY}/src/supernovae_gras.c ${gras_fragile_sources})
 add_library(smpi       STATIC  ${PROJECT_DIRECTORY}/src/supernovae_smpi.c)
index f126228..6f219ac 100755 (executable)
@@ -1,11 +1,16 @@
 #! /bin/sh
 #! /bin/sh
-export LD_LIBRARY_PATH="../src/.libs:$LD_LIBRARY_PATH"
-export CLASSPATH=".:../src/simgrid.jar:$CLASSPATH"
+echo "\n\n"
+pwd
+export LD_LIBRARY_PATH="`pwd`/src/.libs"
+export CLASSPATH="`pwd`/src/simgrid.jar"
 cd $1
 cd $1
-if [ ! -e $2.class ] ; then
-  rm classnoinst.stamp
-  make classnoinst.stamp
-fi
+export CLASSPATH="$CLASSPATH:`pwd`"
 pwd
 pwd
-echo LD_LIBRARY_PATH="../../../src/.libs:$LD_LIBRARY_PATH" java -cp ".:../../../src/simgrid.jar:$CLASSPATH" $options $2 *platform.xml *deployment.xml
-LD_LIBRARY_PATH="../../../src/.libs:$LD_LIBRARY_PATH" java -cp ".:../../../src/simgrid.jar:$CLASSPATH"  $options $2 *platform.xml *deployment.xml
\ No newline at end of file
+
+echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
+echo "CLASSPATH = $CLASSPATH"
+
+echo "\n\n"
+echo "java $2 *platform.xml *deployment.xml"
+echo "\n\n"
+java $2 *platform.xml *deployment.xml