-sources
指定源文件
语法
-sources
file1[,file2,...]
-sources file1
-sources file2
描述
-sources
或 file1[,file2,...]
-sources
用于指定您要分析的源文件的列表。您可以使用此选项,搭配用引号括起来的 UNIX® 通配符来指定源文件。例如,要指定当前文件夹中所有扩展名为 file1
-sources file2
.c
的源文件,请输入:
-sources "*.c"
源文件按照它们的指定顺序进行编译。
示例
分析文件 mymain.c
、funAlgebra.c
和 funGeometry.c
。
Bug Finder:
polyspace-bug-finder -sources mymain.c,funAlgebra.c,funGeometry.c
Code Prover:
polyspace-code-prover -sources mymain.c,funAlgebra.c,funGeometry.c
Bug Finder Server:
polyspace-bug-finder-server -sources mymain.c,funAlgebra.c,funGeometry.c
Code Prover Server:
polyspace-code-prover-server -sources mymain.c,funAlgebra.c,funGeometry.c
Polyspace as You Code:
polyspace-bug-finder-access -sources myfile.c
请注意,使用 Polyspace as You Code 一次只能分析一个文件。
提示
此选项对于从命令行进行的 Polyspace® 分析非常有用。在 Polyspace 用户界面中,您在设置工程期间添加源文件。请参阅在 Polyspace 用户界面中添加要分析的源文件。