Author Topic: [build] Set number of job slots automatically to the number of CPU cores  (Read 377 times)

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 847
Currently the max. number of make recipes executed in parallel is hardcoded as 2 in bootStrap.bash:19. I guess it is safe to set this limit automatically to the number of CPU cores, isn't it?

Code: [Select]
diff --git a/bootStrap.bash b/bootStrap.bash
index d4ea659..ce4e8d9 100644
--- a/bootStrap.bash
+++ b/bootStrap.bash
@@ -16,7 +16,7 @@ debug=0
 qt_ext=Qt5
 QT_FLAVOR="-DENABLE_QT5=True"
 export QT_SELECT=5 # default for ubuntu, harmless for others
-export O_PARAL="-j 2"
+export O_PARAL="-j $(nproc)"
 fail()
 {
         echo "** Failed at $1**"

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 847