Boosting Development Efficiency with CppDepend and TeamCity Integration
- Installing CppDepend on the build server
- Configuring TeamCity
- Setting up the CppDepend Report in the TeamCity Dashboard
Installing CppDepend on the build server
To be able to run CppDepend analysis during a build on a TeamCity server you need to install CppDepend on the server which hosts the TeamCity agent that will run the CppDepend analysis. Just unzip CppDepend in a folder that the TeamCity agent can use. In our example we will use “C:\Program Files\_Tools\Development\cppdepend”.
Configuring TeamCity
- First step: Create a CppDepend project (.cdproj)
- Go to Projects tab and choose your project
- Click on “edit project settings”, you will see your build configurations.
Once you have created your CppDepend project you must execute a command line to generate CppDependOut directory which contains CppDepend report files:

- Click on build
- Click on build steps
- In the build steps you can add a build step (Add build Step) and choose Command line in build runner type
- In the option Run choose Executable with parameters

- In the "Command executable" specify the path of your CppDepend console.
- In the "Command parameters" specify the path of your CppDepend project (.cdproj)

Save the configuration and run build.
Setting up the CppDepend Report in the TeamCity Dashboard
To publish CppDepend HTML report:
- Go to the Projects tab and choose your project
- Click on “edit project settings”
- Click on Report tabs
- In the build report tabs click on "Create new build report tab"

Write the name of your report tab, specify the start page of your CppDepend report and click on Save.

- Go to Projects tab and choose your project
- Click on your last build

- Click on "Edit Configuration Settings"
- Under the "Artifact paths" specify the path of CppDepend out directory which contains the CppDepend Report

- Save the configuration and run build once. The Report will be generated.
- Go to your last build and click on artifact tab; you can see now a tab that contains your html report
