let gen_from_command_line_options () =
    let opt_state opt_fun bset_on_do_all =
      (* DoAll is set + bset_on_do_all = set all options to true ;
         otherwise rely on option switch *)

      if bset_on_do_all && (DoAll.get ()) then true
      else opt_fun ()
    in
      List.fold_left
        (fun acc (opt_name,opt_fun,bset_on_do_all,_) ->
           Datatype.String.Map.add
             opt_name
             (opt_state opt_fun bset_on_do_all)
             acc)
        Datatype.String.Map.empty generating_opts