Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use const& for the parameters of type std::string not affected by previous commit.
[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-2019 The SimGrid Team. Licence: LGPL of WDFPL, as you want.
7
8 if [ ! -e Makefile ] ; then
9   if [ -e build/default/Makefile ] ; then
10     cd build/default
11   else
12     echo "Please configure SimGrid before building it:"
13     echo "   ccmake ."
14     exit 1
15   fi
16 fi
17
18 target=tests
19
20 install_path=$(sed -n 's/^CMAKE_INSTALL_PREFIX:PATH=//p' CMakeCache.txt)
21 if [ -e ${install_path} -a -d ${install_path} -a -x ${install_path} -a -w ${install_path} ] ; then
22   target=install
23 fi
24
25 (
26   echo "install_path: ${install_path}"
27   echo "Target: ${target}"
28   (nice make -j4 ${target} tests || make ${target} tests) && nice ctest -j4 --output-on-failure ; date
29 ) 2>&1 | tee BuildSimGrid.sh.log
30 exit 0