Contenu principal

-options-file

Run Polyspace using list of options

Syntax

-options-file file

Description

-options-file file specifies the file that lists your analysis options. The file must be a text file with each option on a separate line. Use # to add comments to this file.

In the user interface (Polyspace® desktop products only), on the Configuration pane, enter this option in the Other field. See Other.

When using this option in the user interface, in the Other field, specify the absolute path to your options file. For instance:

-options-file C:\psconfig\listofoptions.txt
When using this option in the command line, you can use relative path of the options file as the input.

Unlike command-line usage, do not enclose option arguments in quotes in the options file. For instance, on the command line, you might use -generate-results-for custom="path\to\folder" with quotes. In the options file, specify the same option without quotes:

-generate-results-for custom=path\to\folder

Examples

  1. Create an options file called listofoptions.txt with your options. For example:

    • Bug Finder or Bug Finder Server:

      #These are the options for MyBugFinderProject
      -lang c
      -prog MyBugFinderProject
      -author jsmith
      -sources-list-file sources.txt
      -target x86_64
      -compiler generic
      -dos
      -misra2 required-rules
      -do-not-generate-results-for all-headers
      -checkers default
      -disable-checkers concurrency
      -results-dir C:\Polyspace\MyBugFinderProject

      where sources.txt contains one source file path per line:

      mymain.c
      funAlgebra.c
      funGeometry.c

    • Code Prover or Code Prover Server:

      #These are the options for MyCodeProverProject
      -lang c
      -prog MyCodeProverProject
      -author jsmith
      -sources-list-file sources.txt
      -target x86_64
      -compiler generic
      -dos
      -misra2 required-rules
      -do-not-generate-results-for all-headers
      -main-generator
      -results-dir C:\Polyspace\MyCodeProverProject

      where sources.txt contains one source file path per line:

      mymain.c
      funAlgebra.c
      funGeometry.c

  2. Run Polyspace using options in the file listofoptions.txt:

    • Bug Finder:

      polyspace-bug-finder -options-file listofoptions.txt
    • Code Prover:

      polyspace-code-prover -options-file listofoptions.txt
    • Bug Finder Server:

      polyspace-bug-finder-server -options-file listofoptions.txt
    • Code Prover Server:

      polyspace-code-prover-server -options-file listofoptions.txt