Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
typo in comments
[simgrid.git] / BuildSimGrid.sh
1 #!/usr/bin/env sh
2 #
3 # This little script rebuilds and runs the SimGrid archive in parallel, extracting a log
4 # This is almost an internal script, but others may find this useful
5 #
6 # Copyright (c) 2017-2018 The SimGrid Team. Licence: LGPL of WDFPL, as you want.
7
8 if [ ! -e Makefile ] ; then
9   echo "Please configure SimGrid before building it:"
10   echo "   ccmake ."
11   exit 1
12 fi
13
14 target=all
15
16 install_path=$(sed -n 's/^CMAKE_INSTALL_PREFIX:PATH=//p' CMakeCache.txt)
17 if [ -e ${install_path} -a -d ${install_path} -a -x ${install_path} ] ; then
18   target=install
19 fi
20
21 (
22   echo "install_path: ${install_path}"
23   echo "Target: ${target}"
24   (nice make -j4 ${target} || make) && nice ctest -j4 --output-on-failure ; date
25 ) 2>&1 | tee BuildSimGrid.sh.log
26 exit 0