diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-04 12:23:59 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-04 12:23:59 +0000 |
commit | 750be19ae865da3ee03c132a287148f2402ad72b (patch) | |
tree | 2144b0fa2f04f96b118a1c7fff11a6052758c6a9 /src | |
parent | 315d8fbd7570532e008b03d50226f53fa9e460db (diff) |
* Remove "auto" and "guess" as synonyms for 0 in the handling of
build-cores and --cores. They're superfluous and just complicate
the parsing.
Diffstat (limited to 'src')
-rw-r--r-- | src/libmain/shared.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 19aa1e71c..eddc4e64b 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -135,12 +135,7 @@ static void initAndRun(int argc, char * * argv) /* Get some settings from the configuration file. */ thisSystem = querySetting("system", SYSTEM); maxBuildJobs = queryIntSetting("build-max-jobs", 1); - string tmp = querySetting("build-cores", "/UNDEFINED"); - std::transform(tmp.begin(), tmp.end(), tmp.begin(), tolower); - if (tmp == "auto" || tmp == "guess") - buildCores = 0; - else - buildCores = queryIntSetting("build-cores", 1); + buildCores = queryIntSetting("build-cores", 1); maxSilentTime = queryIntSetting("build-max-silent-time", 0); /* Catch SIGINT. */ @@ -232,14 +227,8 @@ static void initAndRun(int argc, char * * argv) tryFallback = true; else if (arg == "--max-jobs" || arg == "-j") maxBuildJobs = getIntArg<unsigned int>(arg, i, args.end()); - else if (arg == "--cores") { - string tmp = *(++i); - std::transform(tmp.begin(), tmp.end(), tmp.begin(), tolower); - if (tmp == "auto" || tmp == "guess") - buildCores = 0u; - else - buildCores = getIntArg<unsigned int>(arg, --i, args.end()); - } + else if (arg == "--cores") + buildCores = getIntArg<unsigned int>(arg, i, args.end()); else if (arg == "--readonly-mode") readOnlyMode = true; else if (arg == "--max-silent-time") |