Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let the binding examples work without the funky symlinks. This is a step further...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 28 Nov 2010 10:45:50 +0000 (10:45 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 28 Nov 2010 10:45:50 +0000 (10:45 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8713 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/MakeExeLib.cmake
examples/lua/master_slave.tesh
examples/lua/master_slave_bypass.tesh
examples/lua/mult_matrix.tesh
examples/msg/masterslave/masterslave_console.tesh
examples/ruby/MasterSlave.tesh
examples/ruby/PingPong.tesh
examples/ruby/Quicksort.tesh

index 90ced4c..4edd843 100644 (file)
@@ -36,14 +36,6 @@ endif(HAVE_PCRE_LIB)
 
 if(HAVE_RUBY)
        set(SIMGRID_DEP "${SIMGRID_DEP} -l${RUBY_LIBRARY_NAME} -module")
-       ADD_CUSTOM_TARGET(link_simgrid_ruby ALL
-         DEPENDS simgrid ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.${LIB_EXE}
-         )
-       add_custom_command(
-               OUTPUT ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.${LIB_EXE}
-               COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.${LIB_EXE} # if it exists, creating the link fails. So cleanup before hand
-               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.${LIB_EXE} ${PROJECT_DIRECTORY}/src/bindings/ruby/libsimgrid.${LIB_EXE}
-       )
 endif(HAVE_RUBY)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
@@ -61,27 +53,7 @@ if(pthread)
 endif(pthread)
 
 if(HAVE_LUA)
-       SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -l${LIB_LUA_NAME}")   
-         
-    ADD_CUSTOM_TARGET(link_simgrid_lua ALL
-      DEPENDS  simgrid
-                       ${PROJECT_DIRECTORY}/examples/lua/simgrid.${LIB_EXE}
-                               ${PROJECT_DIRECTORY}/examples/msg/masterslave/simgrid.${LIB_EXE}
-                               ${PROJECT_DIRECTORY}/examples/simdag/simgrid.${LIB_EXE}
-       )
-       add_custom_command(
-               OUTPUT  ${PROJECT_DIRECTORY}/examples/lua/simgrid.${LIB_EXE}
-                               ${PROJECT_DIRECTORY}/examples/msg/masterslave/simgrid.${LIB_EXE}
-                               ${PROJECT_DIRECTORY}/examples/simdag/simgrid.${LIB_EXE}
-               COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJECT_DIRECTORY}/examples/lua/simgrid.${LIB_EXE} # if it exists, creating the link fails. So cleanup before hand
-               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.${LIB_EXE} ${PROJECT_DIRECTORY}/examples/lua/simgrid.${LIB_EXE} #for test
-               
-               COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJECT_DIRECTORY}/examples/msg/masterslave/simgrid.${LIB_EXE} # if it exists, creating the link fails. So cleanup before hand
-               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.${LIB_EXE} ${PROJECT_DIRECTORY}/examples/msg/masterslave/simgrid.${LIB_EXE} #for test
-               
-               COMMAND ${CMAKE_COMMAND} -E remove -f ${PROJECT_DIRECTORY}/examples/simdag/simgrid.${LIB_EXE} # if it exists, creating the link fails. So cleanup before hand
-               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.${LIB_EXE} ${PROJECT_DIRECTORY}/examples/simdag/simgrid.${LIB_EXE} #for test                      
-       )
+       SET(SIMGRID_DEP "${SIMGRID_DEP} -ldl -l${LIB_LUA_NAME}")          
 endif(HAVE_LUA)
 
 if(HAVE_GRAPHVIZ)
index 75cbf91..3707638 100644 (file)
@@ -2,6 +2,9 @@
 
 # Later modify the commande and specify the platform and deployment path
 
+# The setenv is mandatory until the make install only
+! setenv LUA_CPATH=../../lib/lua/5.1/?.so;
+
 $ lua master_slave.lua
 > [Tremblay:Master:(1) 0.000000] [lua/INFO] Hello from lua, I'm the master
 > [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 20
index 14b6f6d..f9473ef 100644 (file)
@@ -1,5 +1,8 @@
 # compile the master_slave_bypass example
 
+# The setenv is mandatory until the make install only
+! setenv LUA_CPATH=../../lib/lua/5.1/?.so;
+
 $ lua master_slave.lua --log=surf_parse.thres:critical
 > [Tremblay:Master:(1) 0.000000] [lua/INFO] Hello from lua, I'm the master
 > [Tremblay:Master:(1) 0.000000] [lua/INFO] Got 20
index 24fd093..8f10b12 100644 (file)
@@ -2,6 +2,9 @@
 
 # Later modify the commande and specify the platform and deployment path
 
+# The setenv is mandatory until the make install only
+! setenv LUA_CPATH=../../lib/lua/5.1/?.so;
+
 $ lua mult_matrix.lua
 > [Inmos:Sender:(1) 0.000000] [lua/INFO] Hello From Sender
 > [Inmos:Sender:(1) 0.000000] [lua/INFO] Argc=4 (should be 4)
index fbd8ab2..0b9c964 100644 (file)
@@ -1,5 +1,8 @@
 #! ./tesh
 
+# The setenv is mandatory until the make install only
+! setenv LUA_CPATH=../../../lib/lua/5.1/?.so;
+
 $ $SG_TEST_EXENV ./masterslave_console platform_script.lua --log=surf_parse.thres:critical
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 4 slaves and 20 tasks to process
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
index 0522dd8..3a38d3f 100644 (file)
@@ -1,6 +1,9 @@
 # MasterSlave Ruby Example
+
+# This setenv and the -I arg are mandatory until the make install only
 ! setenv RUBYLIB=../../lib
-$ ruby -I../../src/bindings/ruby MasterSlave.rb
+
+$ ruby -I ../../src/bindings/ruby MasterSlave.rb
 > [Tremblay:Master:(1) 0.000000] [ruby/INFO] args[0]=20
 > [Tremblay:Master:(1) 0.000000] [ruby/INFO] args[1]=50000000
 > [Tremblay:Master:(1) 0.000000] [ruby/INFO] args[2]=1000000
index d0d6ae5..501b23c 100644 (file)
@@ -1,5 +1,8 @@
 #PingPong Example
+
+# This setenv and the -I arg are mandatory until the make install only
 ! setenv RUBYLIB=../../lib
+
 $ ruby -I ../../src/bindings/ruby PingPong.rb
 > [Inmos:Sender:(1) 0.000000] [ruby/INFO] Hello from Sender
 > [Inmos:Sender:(1) 0.000000] [ruby/INFO] Host count :1
index 866e3ae..19a0352 100644 (file)
@@ -1,5 +1,8 @@
 #QuickSort Ruby Example
+
+# This setenv and the -I arg are mandatory until the make install only
 ! setenv RUBYLIB=../../lib
+
 $ ruby -I ../../src/bindings/ruby Quicksort.rb
 > [Inmos:Sender:(1) 0.000000] [ruby/INFO] Hello Bellevue !!, Please !! I need you to help me to sort my table , Here it is :
 > [1, -2, 45, 67, 87, 76, 89, 56, 78, 3, -4, 99]