boojum
boojum

Reputation: 181

How to configure teamcity build agent to use include files on system?

I've a project that uses boost headers/libraries for which I would like to create a build configuration for a team city build agent (TeamCity 10.0.2 / Windows 10 / Visual studio 2015). The boost headers/libraries are not part of the project (that is boost is not in git). Instead the boost headers/libraries on the development machines are located relative to the project files (for example $(SolutionDir)........\boost_1_59_0).

The build with the build agent fails because the boost header files can't be found. To resolve this I've tried to:

How can the build agent be configured so that it knows where to find the boost libraries?

Upvotes: 2

Views: 1218

Answers (1)

Nikita
Nikita

Reputation: 6427

In your build configuration create a new build step before sln build which copies boost headers into proper folder. Use Command Line Runner together with xcopy command to do this.

Command line can use source checkout directory:

xcopy /Y /E "E:\local_boost_install_folder" "%system.teamcity.build.checkoutDir%\src\boost_1_59_0"

One more approach is to set script Working Directory to %system.teamcity.build.checkoutDir%\src\ and create directory link:

mklink /D boost_1_59_0 "E:\local_boost_install_folder"

Upvotes: 2

Related Questions