-options-for-sources
Specify analysis options specific to a source file
Syntax
-options-for-sources
filename
options
Description
-options-for-sources
associates a semicolon-separated list of Polyspace® analysis options with the source file specified by
filename
options
.filename
.
This option is primarily used when the polyspace-configure
command
creates an options file for the subsequent Polyspace analysis. The option -options-for-sources
associates a group
of analysis options such as include folders and macro definitions with specific source
files.
However, you can directly enter this option when manually writing options files. This option is useful in situations where you want to associate a group of options with a specific source file without applying it to other files.
In the user interface of the Polyspace desktop products, you can create a Polyspace project from your build command. The project uses the option
-options-for-sources
to associate specific Polyspace analysis options with specific files. However, when you open the project in the
user interface, you cannot see the use of this option. Open the project in a text editor to
see this option.
Examples
In this sample options file, the include folder
/usr/lib/gcc/x86_64-linux-gnu/6/include
and the macros
__STDC_VERSION__
and __GNUC__
are associated only with
the source file file.c
and not
fileAnother.c
.
-options-for-sources file.c;-I /usr/lib/gcc/x86_64-linux-gnu/6/include;-D __STDC_VERSION__=201112L;-D __GNUC__=6; -sources file.c -sources fileAnother.c
Tips
When associating multiple options with a source file, if you use an option separator other
than semicolon, use a second option -options-for-sources-delimiter
to
explicitly specify this separator. For instance, if you use the separator
@
, specify the additional
option:
-options-for-sources-delimiter @