Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[#!] #!/bin/sh -> #!/usr/bin/env sh
[simgrid.git] / tools / jenkins / build.sh
index d92a433..f5b07f2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env sh
 
 # This script is used by various build projects on Jenkins
 
@@ -83,7 +83,8 @@ echo "XX Get out of the tree"
 echo "XX"
 if [ -d $WORKSPACE/build ]
 then
-  rm -rf $WORKSPACE/build
+  # Windows cannot remove the directory if it's still used by the previous build
+  rm -rf $WORKSPACE/build || sleep 10 && rm -rf $WORKSPACE/build || sleep 10 && rm -rf $WORKSPACE/build
 fi
 mkdir $WORKSPACE/build
 cd $WORKSPACE/build
@@ -122,7 +123,7 @@ cmake -G"$GENERATOR"\
   -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
   -Denable_model-checking=$(onoff test "$build_mode" = "ModelChecker") \
   -Denable_smpi_ISP_testsuite=$(onoff test "$build_mode" = "ModelChecker") \
-  -Denable_compile_optimizations=$(onoff test "$build_mode" = "Debug") \
+  -Denable_compile_optimizations=$(onoff test "$build_mode" != "DynamicAnalysis") \
   -Denable_smpi_MPICH3_testsuite=$(onoff test "$build_mode" != "DynamicAnalysis") \
   -Denable_mallocators=$(onoff test "$build_mode" != "DynamicAnalysis") \
   -Denable_memcheck=$(onoff test "$build_mode" = "DynamicAnalysis") \