Application source files (-sources, -sources-list-file)
Add source files to Polyspace Platform project
Description
Add source files to a Polyspace Platform project or see source files explicitly added to the project.
Set Option
Set the option using one of these methods:
Polyspace Platform user interface (desktop products only): In your project configuration, enter file paths for this option on the Project tab.
Command line and options file: Use the option
-sourcesor-sources-list-file. See Command-Line Information.
Why Use This Option
You typically need this option to see source files explicitly added to a project.
In a regular workflow, you might be adding source files using one of these methods:
Option Add Source File on the Polyspace® Platform toolstrip.
Right-click option Add Source File on the Code node of a Polyspace Platform project.
You see each source file as a new row listed under the Application source files option. The source file path is added relative to the project path. For more information, see Create Project and Add Source Files in Polyspace Platform User Interface.
You can also use this option to add source files by absolute path, or to add source files using a project or system environment variable. These features are not available when adding files using the other methods.
Settings
Specify source files by absolute or relative path.
Add the absolute path to a source file by clicking the Add file button
.Add the relative path to a source file by clicking the Add file as relative path button
.Add multiple source files by clicking the Add/edit multiple rows button
. Then, type or paste one path per line in the
Add/edit multiple rows dialog box. Leading and trailing spaces
are trimmed, and empty lines are ignored.
You can also edit existing paths. Editing existing paths is useful when you use
a project variable or a system environment variable as a shorthand in your paths. After
entering an absolute path using the Add file button
, replace part of the path with a project variable or system
environment variable. Alternatively, use the Add/edit multiple rows button
to edit multiple rows at once. For more information, see
Project variables.
To remove a source file, select the corresponding row and click the Remove selected button
.
Command-Line Information
You can specify file names using the option -sources with a file path, or using the option -sources-list-file with a text file that lists source file paths.
Parameter:
-sources |
| Value: Comma-separated list of file names (also supports wildcards). |
Example (Bug Finder):
polyspace-bug-finder -sources |
Example (Code Prover):
polyspace-code-prover -sources |
Example (Bug Finder Server):
polyspace-bug-finder-server -sources |
Example (Code Prover Server):
polyspace-code-prover-server -sources |
Parameter:
-sources-list-file |
| Value: Text file listing sources with one source file path per line |
Example (Bug Finder):
polyspace-bug-finder -sources-list-file sourceList.txt |
Example (Code Prover):
polyspace-code-prover -sources-list-file sourceList.txt |
Example (Bug Finder Server):
polyspace-bug-finder-server -sources-list-file sourceList.txt |
Example (Code Prover Server):
polyspace-code-prover-server -sources-list-file sourceList.txt |