-options-file
R2026b使用选项列表运行 Polyspace
语法
-options-file file
描述
-options-file 指定列出分析选项的文件。该文件必须是文本文件,且其中的每个选项均位于单独的行中。可使用 file# 向此文件添加注释。
在用户界面(仅限 Polyspace® 桌面端产品)中,在配置窗格的其他字段中输入此选项。请参阅其他。
在用户界面中使用此选项时,在其他字段中指定选项文件的绝对路径。例如:
-options-file C:\psconfig\listofoptions.txt
与命令行用法不同,在选项文件中,不要将选项参量括在引号内。例如,在命令行中,您可能会使用带引号的 -generate-results-for custom="path\to\folder"。在选项文件中,指定不带引号的相同选项:
-generate-results-for custom=path\to\folder
示例
使用您的选项创建一个名为
listofoptions.txt的选项文件。例如:Bug Finder 或 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 -misra3 required-rules -do-not-generate-results-for all-headers -checkers default -disable-checkers concurrency -results-dir C:\Polyspace\MyBugFinderProject
其中,
sources.txt的每一行包含一个源文件路径:mymain.c funAlgebra.c funGeometry.c
Code Prover 或 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 -misra3 required-rules -do-not-generate-results-for all-headers -main-generator -results-dir C:\Polyspace\MyCodeProverProject
其中,
sources.txt的每一行包含一个源文件路径:mymain.c funAlgebra.c funGeometry.c
使用
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