diff --git a/build-eclipse-project.sh b/build-eclipse-project.sh index ad59d87e..4db80d7d 100755 --- a/build-eclipse-project.sh +++ b/build-eclipse-project.sh @@ -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.'