主要内容

Library paths for external tests

Specify folders containing precompiled libraries for building external tests

Since R2023b

Description

External tests are developed using a supported third-party framework. Specify absolute paths to the folder(s) that contain precompiled objects, static libraries, and dynamic libraries required by the external tests. Polyspace® Test™ links the libraries in these folders with your source files and test code to build the test executable. This option does not apply to static analysis.

Set Option

In your Polyspace Platform project configuration, on the Build tab, select the External Tests node and then enter library paths for this option.

Why Use This Option

In Polyspace Test, you can add external tests that use a supported third-party framework, such as GoogleTest. These tests might require libraries specific to the framework. Use this option to specify the location of the precompiled libraries required to build the external tests correctly. Polyspace Test searches for required libraries in these locations when building the project.

Settings

Specify the path to the folders that contain the libraries.

  • Add the absolute path to the folder containing your header files by clicking the Add empty row button and entering the path.

  • Browse to a folder location by clicking the Add folder button .

  • Add or update multiple folder paths by clicking the Add/edit multiple rows button and entering one path per line in the Add/edit multiple rows dialog box. Leading and trailing spaces are trimmed, and empty lines are ignored.

Dependencies

After you specify the library path for external libraries, you must still specify the libraries themselves using the option Libraries for external tests.

Command-Line Information

The command-line workflow for setting this option depends on your workflow.

  • If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the polyspace-test command.

  • If you build your sources and xUnit tests using your own toolchain — You might be able to provide precompiled libraries directly to your compiler as part of your build command. For instance, if you use gcc, use the option -L to specify library paths during command line compilation.

Version History

Introduced in R2023b