If you cannot (or prefer not to) use the previously-mentioned project creation/import strategies, create the project from the GUI as follows:

Tip - Referencing BUILD_ROOT in project settings

In project settings, you can reference BUILD_ROOT as ${BUILD_ROOT} or ${env_var:BUILD_ROOT}.

If you are creating a new project directly in the build directory, which is at the BUILD_ROOT, you can specify the project location as absolute path or using a workspace path variable. Do not use ${BUILD_ROOT} in a project path.

Using the Source Directory as the Project Location

To create a project using the source directory as the project location:

  1. Choose File> New> Project> C/C++> C Project or  C++ Project.
  2. Click Next. The projects wizard will open.
  3. Enter a name for the project in the Project name field.
  4. Disable the Use default location option.
  5. Enter the path to the actual source directory in the Location field.
  6. Under Project Types, select Makefile project.
  7. Under Toolchain, select the appropriate Toolchain.
  8. (Optional) If you want to use Eclipse to build your project, click Next, then complete the settings in the available tabs.
  9. Click Finish.

Using an External Location as the Project Location

To create a project using an external location as the project location:

  1. Create an empty project as follows:
    1. Choose File> New> Project> C/C++> C Project or  C++ Project.
    2. Click Next. The projects wizard will open.
    3. Enter a name for the project in the Project name field.
    4. Click Finish.
  2. Link your source files to that project as follows:
    1. Choose File> New> Folder.
    2. Select the name of the project that you created in Step 1.
    3. Click the Advanced button.
    4. Enable the Link to folder in file system option.
    5. Enter or browse to the location of your source files.
    6. Click Finish.

The linked files will appear within the project folder in the C/C++ Projects view and Project Explorer view, but they will continue to "live" within their original location. C/C++test will not add any new files to the linked source location; any files that it generates will be saved in the project directory.

Warning - Using Appropriate Build Settings

When configuring a project with a linked source folder, you need to modify any project build settings that refer to ${project_loc}; these settings must be changed to use resource_loc instead. If you do not change these default settings, the project’s source files will be skipped during testing.

To change the project’s build settings:

  1. Right-click the C/C++ Projects tree node for the project, then choose Properties from the shortcut menu. The Properties dialog will open.
  2. Expand the Parasoft> C/C++test category in the left pane.
  3. Select the Build Settings category.
  4. Modify the Build working directory setting to ${resource_loc:/<project name>/<linked source dir>/<actual make working dir path from there>}.
  5. Modify the Dependency file(s) setting to ${resource_loc:/<project name>/<linked source dir>/<actual make working dir path from there>/Makefile}.



See Important note for projects with linked source folders for details on how to make the appropriate modifications to your build settings.

  • No labels