Commit 0c3c4e50 authored by MARCHE Claude's avatar MARCHE Claude

fix issue #69

loadpath is now reset to default when using why3config --detect
parent 74b39f31
......@@ -214,6 +214,8 @@ let loadpath m =
Strings.split ':' d
with Not_found -> m.loadpath
let set_loadpath m l = { m with loadpath = l}
let timelimit m = m.timelimit
let memlimit m = m.memlimit
let running_provers_max m = m.running_provers_max
......
......@@ -72,6 +72,8 @@ val set_main : config -> main -> config
val libdir: main -> string
val datadir: main -> string
val loadpath: main -> string list
val set_loadpath : main -> string list -> main
val default_loadpath : string list
val timelimit: main -> int
val memlimit: main -> int
val running_provers_max: main -> int
......
......@@ -24,6 +24,7 @@ let usage_msg =
let conf_file = ref None
let autoprovers = ref false
let autoplugins = ref false
let resetloadpath = ref false
let opt_list_prover_ids = ref false
......@@ -49,8 +50,8 @@ let option_list = Arg.align [
" search for provers in $PATH";
"--detect-plugins", Arg.Set autoplugins,
" search for plugins in the default library directory";
"--detect", Arg.Unit (fun () -> autoprovers := true; autoplugins := true),
" search for both provers and plugins";
"--detect", Arg.Unit (fun () -> resetloadpath := true; autoprovers := true; autoplugins := true),
" search for both provers and plugins, and resets the default loadpath";
"--add-prover", Arg.Tuple
(let id = ref "" in
[Arg.Set_string id;
......@@ -162,7 +163,12 @@ let main () =
if not (Sys.file_exists conf_file) then begin
autoprovers := true;
autoplugins := true;
end;
end;
let config =
if !resetloadpath then
set_main config (set_loadpath (get_main config) default_loadpath)
else config
in
let config =
if !autoprovers
then Autodetection.run_auto_detection config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment