+
if(enable_memcheck)
include(FindValgrind)
endif(enable_memcheck)
-if(enable_smpi)
+if(enable_smpi AND NOT WIN32)
exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc" OUTPUT_VARIABLE "OKITOKI")
exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c" OUTPUT_VARIABLE "OKITOKI")
exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff" OUTPUT_VARIABLE "OKITOKI")
exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
-endif(enable_smpi)
+endif(enable_smpi AND NOT WIN32)
### For code coverage
### Set some variables
tools/MSG_visualization/colorize.pl
tools/sg_unit_extractor.pl
tools/simgrid_update_xml.pl
+buildtools/Cmake/tesh.pl
)
# This is the complete lise of what will be added to the source archive
${CMAKE_BINARY_DIR}/bin/smpiff
${CMAKE_BINARY_DIR}/bin/smpirun
DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
-if(WIN32)
- install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl
- DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/
- RENAME tesh)
- add_custom_target(tesh
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
- )
-else(WIN32)
- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh
- DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
-endif(WIN32)
+
+install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh
+DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
+
install(PROGRAMS ${CMAKE_HOME_DIRECTORY}/tools/MSG_visualization/colorize.pl
DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/
### Load all files declaring binaries (tools, examples and tests) #
###################################################################
add_subdirectory(${CMAKE_HOME_DIRECTORY}/tools/gras)
-add_subdirectory(${CMAKE_HOME_DIRECTORY}/tools/tesh)
+
+if(WIN32)
+ add_custom_target(tesh ALL
+ DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl
+ COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl"
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
+ )
+else(WIN32)
+ add_subdirectory(${CMAKE_HOME_DIRECTORY}/tools/tesh)
+endif(WIN32)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/testsuite/xbt)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/testsuite/surf)
-#!perl -w\r
+#! /usr/bin/perl -w\r
+\r
use strict;\r
\r
-if($#ARGV!=1){die "Usage: perl tesh.pl <directory> <teshfile.tesh>\n";}\r
-my($directory)=$ARGV[0];\r
-my($file)=$ARGV[1];\r
+if($#ARGV!=2){die "Usage: tesh.pl --cd <directory> <teshfile.tesh>\n";}\r
my($line1);\r
my($line2);\r
my($execline);\r
my($ok)=0;\r
-chdir("$directory");\r
-print "Change directory to \"$directory\"\n";\r
+my($nb_arg)=0;\r
+\r
+do{\r
+ if($ARGV[$nb_arg] =~ /^--cd$/)\r
+ {\r
+ $nb_arg++;\r
+ my($directory)=$ARGV[$nb_arg];\r
+ chdir("$directory");\r
+ print "Change directory to \"$directory\"\n"; \r
+ }\r
+ $nb_arg++;\r
+}while(($nb_arg-1)!=$#ARGV);\r
\r
+my($file)=$ARGV[$nb_arg-1];\r
open SH_LIGNE, $file or die "Unable to open $file. $!\n";\r
\r
while(defined($line1=<SH_LIGNE>))\r
$line1 =~ s/^\$\ *//g;\r
$line1 =~ s/^.\/lua/lua/g;\r
$line1 =~ s/^.\/ruby/ruby/g;\r
+ \r
+ $line1 =~ s/\(%i:%P@%h\)/\\\(%i:%P@%h\\\)/g;\r
chomp $line1;\r
$execline = $line1;\r
print "$execline\n";\r
{if(!defined($line2=<FILE_ERR>))\r
{ print "- $line1\n";\r
die;}}\r
- else{if(!defined($line2=<FILE>))\r
+ elsif($line1 =~ /^.*\[.*\].*\[0\:\@\].*$/)\r
+ {if(!defined($line2=<FILE_ERR>))\r
{ print "- $line1\n";\r
die;}}\r
- \r
+ elsif($line1 =~ /^.*\[.*\].*\(0\:\@\).*$/)\r
+ {if(!defined($line2=<FILE_ERR>))\r
+ { print "- $line1\n";\r
+ die;}}\r
+ else{if(!defined($line2=<FILE>))\r
+ { print "- $line1\n";\r
+ die;}} \r
$line2 =~ s/\r//g; \r
chomp $line2;\r
\r