Next: , Previous: Compile, Up: ShellCommand


4.11.4.4 Visual C++

This step is meant to handle compilation using Microsoft compilers. VC++ 6-9, VS2003, VS2005, VS2008, and VCExpress9 are supported. This step will take care of setting up a clean compilation environment, parse the generated output in real time and deliver as detailed as possible information about the compilation executed.

All of the classes are in buildbot.steps.vstudio. The available classes are:

VC6
VC7
VC8
VC9
VS2003
VC2005
VC2008
VCExpress9

The available constructor arguments are

mode
The mode default to "rebuild", which means that first all the remaining object files will be cleaned by the compiler. The alternate value is "build", where only the updated files will be recompiled.
projectfile
This is a mandatory argument which specifies the project file to be used during the compilation.
config
This argument defaults to "release" an gives to the compiler the configuration to use.
installdir
This is the place where the compiler is installed. The default value is compiler specific and is the default place where the compiler is installed.
useenv
This boolean parameter, defaulting to False instruct the compiler to use its own settings or the one defined through the environment variables %PATH%, %INCLUDE%, and %LIB%. If any of the INCLUDE or LIB parameter is defined, this parameter automatically switches to True.
PATH
This is a list of path to be added to the PATH environment variable. The default value is the one defined in the compiler options.
INCLUDE
This is a list of path where the compiler will first look for include files. Then comes the default paths defined in the compiler options.
LIB
This is a list of path where the compiler will first look for libraries. Then comes the default path defined in the compiler options.
arch
That one is only available with the class VS2005 (VC8). It gives the target architecture of the built artifact. It defaults to "x86''.

Here is an example on how to use this step:

     from buildbot.steps.VisualStudio import VS2005
     
     f.addStep(VS2005(
             projectfile="project.sln", config="release",
             arch="x64", mode="build",
             INCLUDE=[r'D:\WINDDK\Include\wnet'],
             LIB=[r'D:\WINDDK\lib\wnet\amd64']))