- tell cmake eclipse generator to use all cores

This commit is contained in:
Mark Vejvoda 2013-01-02 00:13:54 +00:00
parent a2ee9d3b19
commit 79caed1ac5
1 changed files with 6 additions and 2 deletions

View File

@ -10,15 +10,19 @@ cd eclipse
if [ -f 'CMakeCache.txt' ]; then rm -f 'CMakeCache.txt'; fi
LANG=C
NUMCORES=`cat /proc/cpuinfo | grep -cE '^processor'`
# This is for regular developers and used by our installer
cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON ${CURRENTDIR}
cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX= -DWANT_STATIC_LIBS=ON -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j$NUMCORES ${CURRENTDIR}
if [ $? -ne 0 ]; then
echo 'ERROR: CMAKE failed.' >&2; exit 1
fi
cd ${CURRENTDIR}
echo ''
echo '*** Eclipse Project files [.project and .cproject] are created in the folder: [eclipse] and can be imported'
echo '*** Eclipse Project files [.project and .cproject] can be imported from the folder: [eclipse]'
echo 'detected and using: ' $NUMCORES ' cores...'
echo 'Import the created project using Menu File->Import'
echo 'Select General->Existing projects into workspace:'
echo 'Browse where your build tree is ['${CURRENTDIR}'/eclipse] and select the directory.'