X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ed37babb2fa9097abe82df299c0aa259ed84d5a..2e2c91eaa94e8fa79a41bbcdd443f55ad2a37f19:/BuildSimGrid.sh diff --git a/BuildSimGrid.sh b/BuildSimGrid.sh index 773ca48425..410d1ddb70 100755 --- a/BuildSimGrid.sh +++ b/BuildSimGrid.sh @@ -15,8 +15,9 @@ if [ ! -e Makefile ] && [ ! -e build.ninja ]; then fi fi -target=tests +target=examples ncores=$(grep -c processor /proc/cpuinfo) +halfcores=$(expr $ncores / 2 + 1) install_path=$(sed -n 's/^CMAKE_INSTALL_PREFIX:PATH=//p' CMakeCache.txt) if [ -e ${install_path} ] && [ -d ${install_path} ] && [ -x ${install_path} ] && [ -w ${install_path} ] ; then @@ -32,7 +33,8 @@ fi ( echo "install_path: ${install_path}" echo "Target: ${target}" - echo "Cores: ${ncores}" - (nice ${builder} -j${ncores} ${target} tests || make ${target} tests) && nice ctest -j${ncores} --output-on-failure ; date + echo "Cores to build: ${ncores}" + echo "Cores to test: ${halfcores}" + (nice ${builder} -j${ncores} ${target} tests || ${builder} ${target} tests) && nice ctest -j${halfcores} --output-on-failure ; date ) 2>&1 | tee BuildSimGrid.sh.log