Page tree

Skip to end of metadata
Go to start of metadata

This section explains how to create and configure projects. It covers:

Importing an Existing eMbedded Visual C++ 4.0 Project

You can import existing eMbedded Visual C++ 4.0 projects from the GUI or from the command line.

Importing a Project with the GUI Wizard

To create a C++test project from a  eMbedded Visual C++ 4.0 project:

  1. Choose File> New> Project
  2. Select C++test> Import Microsoft eMbedded Visual C++ 4.0 projects
  3. Click Next. The Import Microsoft eMbedded Visual C++ 4.0 project will open.
  4. In the text field at the top of the wizard, specify the Microsoft eMbedded Visual C++ 4.0 project file (.vcp), Microsoft eMbedded Visual C++ 4.0 workspace file (.vcw), or root directory where you want C++test to search for Microsoft eMbedded Visual C++ 4.0 projects. The projects found will be listed in the "Projects to be imported" tree.
  5. Check the projects that you want to import, then click Next.



  6. Specify the location for the imported projects.
    • To use the workspace location, choose Use workspace location.
    • To use the original .vcp file location, choose Use original .vcp file location.
    • To use a custom location, choose Use external location, then specify the desired location.
    • If you want the project(s) imported into subdirectories created in the specified external location, enable Create sub-directory for each project.
    • If you are importing only one project and you want it imported directly into the specified external location, clear Create sub-directory for each project.



  7. If you want the .vcp project source folders to be linked into the created C++test project, enable Use linked folders to include .vcp project contents.
  8. If you want to specify path variables to be used in linked folder locations (e.g., to make project sharing possible), enable Use Path Variable to define linked folder locations, then specify the variables that you want to use. If this setting is false (the default), path variables will not be used while creating linked folders.
  9. In the project configuration settings area, indicate the .vcp project configuration that you want used in the imported project.
    • To use the default project configuration from the .vcp project, enable Use a default configuration from .vcp project.
    • To use an alternative project configuration, enable Use other configuration (if applicable), then select the desired configuration from the drop-down menu (which lists the configurations that are applicable to the specified projects).
  10. Click Finish.

If an existing project in the workspace has the same name as the imported project, the Finish button will be disabled and a warning message will be reported.

 

Note

The imported project will be configured for C++test analysis only; it will not be configured for building in the Eclipse environment that C++test builds upon.

Importing a Project from the Command Line

You can also import Microsoft eMbedded Visual C++ 4.0 projects in command line mode by using the -vcp <vcp_vcw_dir> option to cpptestcli. Importing is a separate action that is launched before any tests are performed.

For example, you might use

"cpptestcli -data <workspace> -vcp <vcp_vcw_dir> -config <test_cfg_url> -localsettings <localsettings_props>"

  • vcp_vcw_dir is a path to a eMbedded Visual C++ project file, a workspace file, or a directory.
  • localsettings_props is the path to an options file containing various batch mode settings.

If you want to change the default import settings, you can specify this in a plain text options file  (described in Local Settings (Options) Files). The following eMbedded Visual 4.0 project import settings can be used in the options file:

  • vcp.import.location=[WORKSPACE|VCP_LOC|<path>]: Specifies where to create projects.
    • If WORKSPACE is used, then the project will be created in the workspace.
    • If VCP_LOC is used, then the project will be created in the .vcp project location.
    • If an external path is specified, then the project will be created in the specified location.
  • vcp.import.subdirs=[true|false]: Specifies whether to create a subdirectory for each project. Use false only when importing a single project.
  • vcp.import.linked=[true|false]: Specifies whether to create linked folders.
  • vcp.import.pathvar.enabled=[true|false]: Specify whether the Path Variables are created and used for linked folders.
  • vcp.import.pathvar.name=<name>: Specifies the name of the Path Variable (if Path Variables are used, per the vcp.import.pathvar.enabled property). The default Path Variable name is DEVEL_ROOT_DIR.
  • vcp.import.pathvar.value=<path>: Specifies the value of the Path Variable (if Path Variables are used, per the vcp.import.pathvar.enabled property). The default value is the most common root directory for all linked folders.
  • vcp.import.config=<name>: Specifies the name of the build configuration to use. The default is to use the project's default (active) one.

The batch mode wizard functions much like the GUI mode, with the following exceptions:

  • You cannot fine-tune the set of projects to import; it will try to import all sets found at the specified location.
  • Import progress is printed to the console.
  • Canceling the process during the importing phase (with "Ctrl-C") will terminate the whole batch mode processing.

Configuring Projects

For static analysis, no additional configuration is needed (other than importing the project).

For unit testing, the Runtime Library is required. It can be built automatically by C++test (the default) or manually from Visual Studio IDE or from a Makefile. To learn about the runtime library, see Working with the C++test Runtime Library.

  • No labels