主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

-options-file

使用选项列表运行 Polyspace

语法

-options-file file

描述

-options-file file 指定列出分析选项的文件。该文件必须是文本文件,且其中的每个选项均位于单独的行中。可使用 # 向此文件添加注释。

在用户界面(仅限 Polyspace® 桌面端产品)中,在配置窗格的其他字段中输入此选项。请参阅其他

在用户界面中使用此选项时,在其他字段中指定选项文件的绝对路径。例如:

-options-file C:\psconfig\listofoptions.txt
在命令行中使用此选项时,可以使用选项文件的相对路径作为输入。

示例

  1. 使用您的选项创建一个名为 listofoptions.txt 的选项文件。例如:

    • Bug Finder 或 Bug Finder Server:

      #These are the options for MyBugFinderProject
      -lang c
      -prog MyBugFinderProject
      -author jsmith
      -sources "mymain.c,funAlgebra.c,funGeometry.c"
      -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
    • Code Prover 或 Code Prover Server:

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

  2. 使用 listofoptions.txt 文件中的选项运行 Polyspace:

    • 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