Module Cmdliner_term_deprecated

Contents

Instructions: Use this module in your project

In the IDE (CLion, Visual Studio Code, Xcode, etc.) you use for your DkSDK project:

  1. Add the following to your project's dependencies/CMakeLists.txt:

    Copy
    DkSDKProject_DeclareAvailable(cmdliner
        CONSTRAINT "= 1.1.1+dune"
        FINDLIBS cmdliner)
    DkSDKProject_MakeAvailable(cmdliner)
  2. Add the Findlib::cmdliner library to any desired targets in src/*/CMakeLists.txt:

    Copy
    target_link_libraries(YourPackage_YourLibraryName
         # ... existing libraries, if any ...
         Findlib::cmdliner)
  3. Click your IDE's Build button

Not using DkSDK?

FIRST, do one or all of the following:

  1. Run:

    Copy
    opam install cmdliner.1.1.1+dune
  2. Edit your dune-project and add:

    Copy
    (package
      (name YourExistingPackage)
      (depends
      ; ... existing dependenices ...
      (cmdliner (>= 1.1.1+dune))))

    Then run:

    Copy
    dune build *.opam # if this fails, run: dune build
  3. Edit your <package>.opam file and add:

    Copy
    depends: [
      # ... existing dependencies ...
      "cmdliner" {>= "1.1.1+dune"}
    ]

    Then run:

    Copy
    opam install . --deps-only

FINALLY, add the cmdliner library to any desired (library)and/or (executable) targets in your **/dune files:

Copy
(library
  (name YourLibrary)
  ; ... existing library options ...
  (libraries
    ; ... existing libraries ...
    cmdliner))

(executable
  (name YourExecutable)
  ; ... existing executable options ...
  (libraries
    ; ... existing libraries ...
    cmdliner))
valpure :'a -> 'a Cmdliner_term.t
typeexit_info`` =Cmdliner_info.Exit.info
valexit_info : ``?docs:string->``?doc:string-> ``?max:Cmdliner_info.Exit.code -> Cmdliner_info.Exit.code -> Cmdliner_info.Exit.info
valexit_status_success :Cmdliner_info.Exit.code
valexit_status_cli_error :Cmdliner_info.Exit.code
valexit_status_internal_error :Cmdliner_info.Exit.code
valdefault_error_exits :Cmdliner_info.Exit.info list
valdefault_exits :Cmdliner_info.Exit.info list
typeenv_info`` =Cmdliner_info.Env.info
valenv_info : ``?docs:string->``?doc:string-> Cmdliner_info.Env.var -> Cmdliner_info.Env.info
val info : ``?man_xrefs:Cmdliner_manpage.xreflist``-> ``?man:Cmdliner_manpage.blocklist``-> ``?envs:Cmdliner_info.Env.infolist``-> ``?exits:Cmdliner_info.Exit.infolist``->``?sdocs:string->``?docs:string->``?doc:string->``?version:string->``string-> Cmdliner_info.Cmd.t
valname :Cmdliner_info.Cmd.t -> string
type``'a result`` = ``[
| ``` Ok ``of 'a
| ``` Error ``of``` [Parse ```` | Term ``` ``` | Exn ``` ]`
| ``` Version ``
| ``` Help `` ]
valto_legacy_result : ``(``[<'a Cmdliner_eval.eval_ok]``, ``` [Exn  ```` | Parse ``` ``` | Term ``` ]) [result](../../ocaml/Stdlib/#type-result) `-> 'a0 [result\](#type-result)
val eval : ``?help:Stdlib.Format.formatter -> ``?err:Stdlib.Format.formatter ->``?catch:bool->``?env:``(``string->``string option``)``->``?argv:``string array``-> ``('a Cmdliner_term.t*Cmdliner_cmd.info)`` -> 'b result
val eval_choice : ``?help:Stdlib.Format.formatter -> ``?err:Stdlib.Format.formatter ->``?catch:bool->``?env:``(``string->``string option``)``->``?argv:``string array``-> ``('a Cmdliner_term.t*Cmdliner_cmd.info)`` -> ``('b Cmdliner_term.t*Cmdliner_cmd.info)`` list`` -> 'c result
valeval_peek_opts : ``?version_opt:bool->``?env:``(``string->``string option``)``->``?argv:``string array``-> 'a Cmdliner_term.t -> 'aoption`` *'b result
val exit_status_of_result : ``?term_err:Cmdliner_info.Exit.code ->``[< ```Error of  [< `Exn  | Parse ``` ``` | Term ]`` | Help ``` ``` | Ok of unit`` | Version ``` ]`` -> Cmdliner_info.Exit.code
val exit_status_of_status_result : ``?term_err:Cmdliner_info.Exit.code ->``[< ```Error of  [< `Exn  | Parse ``` ``` | Term ]`` | Help ``` ``` | Ok of `[`Cmdliner_info.Exit.code`](../Cmdliner_info-Exit/#type-code)` | Version ``` ]`` -> Cmdliner_info.Exit.code
valstdlib_exit : ``int-> 'a
val exit : ``?term_err:Cmdliner_info.Exit.code ->``[< ```Error of  [< `Exn  | Parse ``` ``` | Term ]`` | Help ``` ``` | Ok of unit`` | Version ``` ]`` -> 'a
val exit_status : ``?term_err:Cmdliner_info.Exit.code ->``[< ```Error of  [< `Exn  | Parse ``` ``` | Term ]`` | Help ``` ``` | Ok of `[`Cmdliner_info.Exit.code`](../Cmdliner_info-Exit/#type-code)` | Version ``` ]`` -> 'a