about summary refs log tree commit diff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-06-30T15·19+0000
committerLudovic Courtès <ludo@gnu.org>2011-06-30T15·19+0000
commit5c9e9f732df6d95d712f25de9880b7461c53d6ca (patch)
treed4e562f7048f57d0ec87461bce441dfd450374f7 /src/libmain/shared.cc
parent9c99aa2620b8f86c0e7f99ebfe868e8ccb306f71 (diff)
Add support for the `build-timeout' and `--timeout' options.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 3110c945232e..43ec4bcdd482 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -142,6 +142,7 @@ static void initAndRun(int argc, char * * argv)
     maxBuildJobs = queryIntSetting("build-max-jobs", 1);
     buildCores = queryIntSetting("build-cores", 1);
     maxSilentTime = queryIntSetting("build-max-silent-time", 0);
+    buildTimeout = queryIntSetting("build-timeout", 0);
 
     /* Catch SIGINT. */
     struct sigaction act;
@@ -237,6 +238,8 @@ static void initAndRun(int argc, char * * argv)
             readOnlyMode = true;
         else if (arg == "--max-silent-time")
             maxSilentTime = getIntArg<unsigned int>(arg, i, args.end());
+        else if (arg == "--timeout")
+            buildTimeout = getIntArg<unsigned int>(arg, i, args.end());
         else if (arg == "--no-build-hook")
             useBuildHook = false;
         else if (arg == "--show-trace")