Set build configuration for command line build in Codegear 2009 IDE
This is a follow up qu开发者_开发知识库estion. Is it possible to set the build configuration for a command line build in Codegear 2009?
For example:
msbuild /property:BuildConfiguration=Release workspaceX.groupproj
Yes. In fact you're very close with your example. Use /p:Configuration="Name"
:
msbuild YourProj.cbproj /p:Configuration="Release Build"
It is Configuration="Name"
for a C++Builder project, and config="Name"
for a Delphi project, which you'll need to be aware of if your project group mixes Delphi and C++Builder projects. (I don't know why this is, but there you go. You would not believe how long that took to figure out. Edit: according to a comment, 'config' works in 2009. I can only state that for certain it did not work for us in 2010.)
You can also use /t:
to specify a target, such as cleaning, building or making your project; /verbosity
to set an output level ('quiet
' is the closest that mimics the old C++Builder 6 compiler output without writing a custom MSBuild logger); and other switches which you can see if you type msbuild /?
at a command line. You can end up with something like this:
msbuild YourProj.cbproj /p:Configuration="Release Build" /t:Make /verbosity:quiet /nologo
You'll need to include a line like this in your build script for each project in your project group. As far as I'm aware, you can't build or make a project group itself as a whole from the command line.
精彩评论