mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-01 18:16:14 +02:00
Set build-max-jobs to the number of available cores by default
More zero configuration.
This commit is contained in:
parent
ada3e3fa15
commit
de4cdd0d47
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
@ -29,6 +30,10 @@ Settings::Settings()
|
||||||
buildVerbosity = lvlError;
|
buildVerbosity = lvlError;
|
||||||
maxBuildJobs = 1;
|
maxBuildJobs = 1;
|
||||||
buildCores = 1;
|
buildCores = 1;
|
||||||
|
#ifdef _SC_NPROCESSORS_ONLN
|
||||||
|
long res = sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
|
if (res > 0) buildCores = res;
|
||||||
|
#endif
|
||||||
readOnlyMode = false;
|
readOnlyMode = false;
|
||||||
thisSystem = SYSTEM;
|
thisSystem = SYSTEM;
|
||||||
maxSilentTime = 0;
|
maxSilentTime = 0;
|
||||||
|
|
Loading…
Reference in a new issue