qacli project roots
Manage project root entries for a project.
Usage
Extended Description
Code bases, in general, consist of many projects, sub-projects, components and/or modules. Often, the build of each entity is dependent on information from other entities, such as include directories. Helix QAC projects are designed to be portable.
For example, they can be checked into version control on one machine, and then checked out on another machine for analysis. However, for this to work, dependencies, such as third party and project include directories, must be capable of being located wherever the project has been checked out or moved.
Helix QAC allows you to set multiple root directories for source files. In many cases, just a single root directory is enough, but you may need more than one root directory - for example, if your project uses third party code. For more information, see Setting the Root Directory of Your Sources.
By default, a Helix QAC project will always contain at least two roots:
PROJECT_ROOT
: Location of the Helix QAC project i.e. the directory the prqaproject.xml file resides in.SOURCE_ROOT
: The location of the projects source code. If none has been explicitly set then it will default toPROJECT_ROOT
.
Roots are normally stored in prqaproject.xml
, which makes them specific to the project. If you add a root that already exists in the project then this root will be stored in a different location, overriding the entry in prqaproject.xml
. This allows a user to tailor the root to their environment, but not change the underlying project.
Options
Examples
Setting the SOURCE_ROOT for a Project
This will change the location of the SOURCE_ROOT
within the project:
Changing the Location of SOURCE_ROOT
This will change the location of the SOURCE_ROOT
but will not change it within the project:
Listing Roots in a Project
This will list all roots in the project:
Where a root exists at more than one level, only the most important entry will be shown. For example, "user" will be shown over "project".
Containing Roots Within Roots
A root can also contain another root. Take care with argument quoting to avoid the shell interpreting the variable.
qacli project roots -P . --add THIRD_PARTY_PARENT --path ‘/home/steve’ --force
qacli project roots -P . --add THIRD_PARTY_ROOT --path ‘${THIRD_PARTY_PARENT}/src’ --force