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
(
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