You can import existing Green Hills Software .gpj projects from the GUI or from the command line.
Note that we support the GPJ format introduced in the MULTI-4.0 environment. Direct importing of BLD format project files is not supported, but you can use the bldtogpj.exe tool to validate and convert projects in the BLD format. See Validating and Converting GHS MULTI 2000 C/C++ Compiler v3.5 .bld Projects.
The key supported MULTI Builder features are:
- Recognizing types and hierarchies of project files.
- Accumulation of compilation and linking options.
- Searching files on paths specified with Source Directories Relative to This File (:sourceDir) and Source Directories Relative to Top-Level Project (:sourceDirNonRelative) build-only properties.
- Importing of environment variables.
The GPJ-related features in C++test allow:
- Scanning project structures for testable projects, sources, and build options.
- Creation of test projects from your original GPJ testable projects, either manually or using the specialized project importer.
Importing a Project with the GUI Wizard
To create a C++test project from a .gpj project:
- Choose File> New> Project.
- Choose C++test> Import Green Hills Software projects.
- Click Next. The Import Green Hills Software projects wizard will open.
- Complete the first page of the wizard as follows, then click Next.
- In the Select root .gpj file field, enter or browse to the root GPJ project file path.
- In the Projects to be imported tree, select the testable projects to import.
- Complete the second page of the wizard as follows, then click Finish.
- In Imported Projects Destination, specify whether you want the C++test project to be created: in the workspace, the original testable GPJ project location, or some external location.
- If you choose external location, specify the external path (or browse to it) and specify whether you want to create a subdirectory for each project.
- In Project contents settings, specify if you want to use linked folders (recommended).
- If you choose to use linked folders, specify if you want to use Path Variable to define linked folder locations and—if so—provide the appropriate variable information.
- In Compiler settings, choose the compiler family and/or specify the executables.
- In Imported Projects Destination, specify whether you want the C++test project to be created: in the workspace, the original testable GPJ project location, or some external location.
Check if any error/warning messages are displayed on the wizard’s title area. If there are messages, you may not be able to navigate the pages and/or to finish the wizard.
Importing a Project from the Command Line
To create a C++test project from a .gpj project, do one of the following:
- Use the
-gpj <prj_root_file>
switch tocpptestcli
. - First, create a plain text options file with the desired
gpj.import.*
options (see Local Settings (Options) Files for details). Then, in yourcpptestcli
invocation, use-gpj <prj_root_file>
and-localsettings <options.file>.
If an existing project in the workspace has the same name as the imported project, the new project will not be imported.
Validating and Converting GHS MULTI 2000 C/C++ Compiler v3.5.bld Projects
Direct importing of BLD format project files is not supported. Users can instead use the bldtogpj.exe tool to validate and convert BLD format to the recognized GPJ format. The bldtogpj.exe tool will utilize the gbldconvert.exe shipped with the GHS v4.0 C/C++ compiler for PowerPC distribution to create a new GPJ format project file.
Usage
bldtogpj.exe <path_to_gbldconvert> <path_to_top_level_bld_file> <optional:name_of_ext> <path_to_gbldconvert> : absolute path to gbldconvert in GHS 4.0/4.2 <path_to_top_level_bld_file> : absolute path to the main bld project file <optional:name_of_ext> : extension of the generated gpj file (must end in .gpj, default is .parasoft.gpj)
Example
bldtogpj.exe "C:\GHS\PPC405b\gbldconvert.exe" "C:\Project\default.bld" ".ext.gpj"
After the validation and conversion, a new GPJ file with the specified extension (or by default .parasoft.gpj extension) will be created. You can utilize this newly created GPJ format project file for importing into C++test. See Importing an Existing Green Hills Software .gpj Project.