Available Build Tools (make, etc)? [closed] - build

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
There's a lot of questions on here regarding various niche build needs (.NET, continuous integration, etc) but, of course, my niche need is different.
Rather than asking a very specific question right now, I'd like a survey of available build tools (such as make, ant, etc) so I can ask a follow up question more intelligently if needed.
In your answer, please include:
ONE build tool
Link to the main page about that tool
If you know some pros and cons (ie, runs on windows with cygwin, or .NET specific, etc) then list some (not required - the name and link are required)
If your build tool is already in an answer, comment on it adding pros/cons/limitations/experiences. Feel free to add as many answers as you like as long as they don't already exist - but don't put several build tools into one answer.

SCons
Build scripts are Python scripts. Supposed to work on Linux, Windows, Mac OS X.

NAnt
http://nant.sourceforge.net/
Similar to Ant, a build tool for .Net

Rake
Ruby version of make
Pros:
Clean idiomatic ruby syntax
Rake files are written in ruby, so leverages ruby itself rather than proprietary file format or XML
Ruby on Rails tightly integrated with it
Cons:
Requires ruby, which is not always available
No built-in packaging support/versioning/dependency management (see rubygems)

premake
Build script generator. Uses Lua to describe the build. It can generate Makefile or project files for Visual Studio, Code::Blocks, CodeLite, SharpDevelop, MonoDevelop, etc. Built-in support for C, C++, C#, including things like resources and ASP.NET. Mono support.

Jam family.
Jam
FTJam
BJam
BJam is based on FTJam, which in turn is based on Jam. Small, fast, portable. Automatic dependency analysis for C, C++. It is not a generator -- it does not generate any Makefile or other build files for secondary build systems.

Apache Maven
Pros:
Automatic dependency management
Utilizes convention over configuration (enforces consistent project directory structures)
Projects that use maven can be built in minutes
Excellent support for standard java/Java EE project builds
Works well in a team environment (supports "team" configurations)
Built in release/versioning concepts
Integrates with popular Java IDEs
Growing support in java OSS community
Cons:
Steep learning curve (esp. compared to Ant)
Poor online documentation (the new book is excellent though)
Sometimes surprising behavior
Very java-centric
XML configuration driven

GNU Make
http://www.gnu.org/software/make/

CMake
Cross-platform build system generator. It can generate Makefile or project files for Visual Studio, Eclipse CDT, KDevelop, Code::Blocks, etc. Automatic dependency analysis for C, C++, Fortran, Java.

Apache Ant
Pro:
many task/plugins
runs on many platforms
very mature
is supported by many IDEs, Continuous-Integration-Tools etc.
Con:
requires Java

FinalBuilder
Pros
Visual and GUI-oriented unlike ant or make
Lots of built-in actions
Script builder for your own actions
Integrates easily with cc.net
Cons
Only runs on Windows
Not free, but you get good value for your money
They also have a tool called Automise that does more system-oriented tasks.

Team City
Pros
All available here
Cons
Can be memory intensive

MSBuild
http://msdn.microsoft.com/en-us/library/wea2sca5(VS.80).aspx

CruiseControl/CruiseControl .Net
http://cruisecontrol.sourceforge.net/
Pros
Can use various build and TDD tools depending on version chosen
Automate when builds happen and what kind - full release build or changed code build
Can automatically run tests (nUnit, jUnit, Fitnesse, etc.) on a build to ensure that all tests still pass when new code is checked into the project.
Integrates with source control
Error reporting and notification when builds fail
Cons
Error reporting isn't always in a nice pretty to read format
Set up of projects should be well thought out and all projects monitored should use certain patterns to make integration setup more efficient.

PSake (pronounced "Sake")
Pros -
Powershell
Cons -
Powershell :)
This project is fairly new, looks interesting, and would be very powerful, since it's ".NET at the command line". Unfortunately, I don't know very many people who take the time to learn Powershell.

cons
Pros:
Uses Perl, if you like that sort of thing
Haven't used it otherwise :-)
Cons:
Hard to Google for!
Not actively developed?

UppercuT -
Some good explanations here: UppercuT
Pros -
Super easy to get started - Automated Builds as easy as (1) solution name, (2) source control path, (3) company name for most projects!!!
Limited knowledge of NAnt necessary.
Cons -
Only available for .NET

NUBuild (pronounced "New-Build")
This is the latest and pretty advanced .Net build tool (a very intelligent one) called NUBuild that allows you to build VB.Net and C# projects. Its extremely lightweight, open source and at the same time easy to setup and provides almost no-touch maintenance.
Easy to use command line interface
Ability to target all .Net framework version i.e. 1.1, 2.0, 3.0 and 3.5
Supports XML based configuration
Supports both project and file references
Automatically generates the “complete ordered build list” for a given project
Ability to detect and display circular dependencies
Perform parallel build
Ability to handle proxy assemblies
Easily integrated with Cruise-Control.Net continuous integration system
Version management capability
Notification feature
http://nubuild.codeplex.com/
It's best the build tool we have seen so far!

Bakefile
Bakefile is cross-platform, cross-compiler native makefiles generator. It takes compiler-independent description (XML) of build tasks as input and generates native makefile (autoconf's Makefile.in, Visual C++ project, bcc makefile etc.).
Bakefile's task is to generate native makefiles, so that people can keep using their favorite tools. There are other cross-platform make solutions, but they either aren't native and require the user to use unfamiliar tools (Boost.Build) or they are too limited (qmake).

Related

Cross platform continuous integration pipeline for C++ / Qt applications

EDIT 2012.03.02: updated build tool section with some other requirements. Addding premake.
EDIT 2012.03.05: updated build tool section. Focused on CMake. Added Ant + CMakeAnt.
I have a lot of small Visual C++ projects and I want to start using continuous integration for that. A lot of tools are involved in the process. I start reading articles here and there and it is hard for me to see which to tool could integrate nicely with the others. So I am looking for an already tested continuous integration workflow that could respect my needs:
Current Context
C++/Qt applications developed with Visual Studio;
Less than 1'000 source files;
Small dev team;
Small budget;
Preferably open source/free software;
Looking for easy to use and simple tools. No need of something heavy and "powerful".
Finally packages software (installers ready for download) should work for windows and OSX. Linux (most popular distributions) is a plus.
Tools needed
Continuous Integration Server:
Needs to be Jenkins. I know it and I like it. I could change for another one if it is really needed.
Source Code Management:
GIT.
Documentation Generator:
Doxygen.
Build Tool:
We will need to generate solutions and configurations for all the platforms we need to support. I have been strongly advised to use CMake for that. Ant + CMakeAnt (http://code.google.com/p/cmakeant/) seems to be a nice addition too.
Unit Testing Framework:
CPPunit, C++Test, Googletest?
Installers Builder
CPack (part of CMake seems great too).
Hardware:
Preferably, one single machine with VirtualBox or VMWare. is it only possible? Would it be better to use Linux for such things? Or would a MAC mini be sufficient?
So, has anyone here already built something similar? With which tools exactly?
Thanks for any comments and suggestions.
I have successfully used CMake/CTest/CPack with Jenkins, there is a CMake builder plugin available.
I found the ctest --output-on-failure option to be useful as the output from the test is shown in the Jenkins log on failure.
I use the Boost.Test framework for testing C++, it works fine with ctest, I run it with the -l all option to get all the logging output when something goes wrong.
You should be able to bootstrap the entire process using a bunch of scripts.
Write them in Perl or Python. There are a million tutorials on how to bootstrap these sorts of processes.
If you're stuck on implementing a specific party of this build-process, ask a specific question about it.

Build server / continuous integration recommendation for C++ / Qt-based projects

I'm looking to implement a build server for Qt-based C++ projects. The server needs to check out the necessary code / assets from Subversion, build the executable files, assemble the artifacts for installation projects, and build the installation media files. The target platforms and (rough) toolchains are:
Windows (32- and 64-bit): qmake, nmake, msbuild, wix toolchain. The end result is an installer EXE and DVD image.
Mac OS X: qmake, make, custom bash scripts to assemble package. The end result is an application bundle within a disk image and a DVD image.
Ubuntu (32- and 64-bit): qmake, make, debuild-based scripts. The end result is a collection of DEB files and a DVD image.
Fedora (32- and 64-bit): qmake, make, rpmbuild-based scripts. The end result is a collection of RPM files and a DVD image.
So that's at least 4 build agents (maybe more if 32- and 64-bit can't be done on the same box) and 7 configurations. Open-source projects are preferred, but that is not an absolute requirement.
Most of the tools I'm seeing seem to be catered to Java (Jenkins, CruiseControl, etc.) or .Net (CruiseControl.net, etc.) Can those be used with a C++ toolchain, or will I constantly be fighting the system? Anything that you have used in the past and found works well with Qt / C++?
I use Jenkins for building and packaging many C++ projects, based on qmake, cmake, and makefiles.
There are plugins for cmake, qmake, and msbuild, but any command line scripts can be run as well.
I have done packaging using Jenkins with no problems, as it is just another command line step in a project.
There are good plugins for monitoring the number of warnings/errors produced by the compiler (I normally use GCC).
It also has matrix builds which allow you to build a project several times with different combinations of compiler flags, pre-processor variables, platform, etc. One project I set up is a matrix build with 5 boolean preprocessor flags on two platforms, which then does 2^6=64 builds. These can take a bit of setting up to get correct.
Here you can read a quick example:
Continuous Integration Server - Hudson
I think that Hudson, jenkins and builbot are worth a try. Wasting a day or two evaluating and trying them with a quick example will help you to choose confidently.
Most of the tools I'm seeing seem to be catered to Java (Jenkins, CruiseControl, etc.) or .Net (CruiseControl.net, etc.) Can those be used with a C++ toolchain, or will I constantly be fighting the system? Anything that you have used in the past and found works well with Qt / C++?
Any reasonably capable CI system will have a piece that will allow you to execute any program you want for your build command.
Here's what I would consider:
Does the CI system run on your system(s) of choice
Does it allow you an easy way to view your logs
Does it integrate with your test runner
Does it integrate with your code coverage reports (e.g. BullseyeCoverage w/C++ & Qt)
Will it publish your files in a manner sensible for your needs
Will at provide an archive/store of files, if necessary (e.g. pdbs & lib*.so.debug)
If the CI system doesn't support feature X, will you have to write it for each supported OS/system
Is the CI system / UI easy for you to use.
I did the above using CruiseControl and most things were pretty easy. I wrote everything in make or qmake and simply called out to the command that I needed executed. For unit test and code coverage integration I output stuff to XML and transformed it to something supported by CruiseControl.
My recommendation, take a look at the recommended CI systems and examine them based on the criteria above.
I'm using buildbot for this. I've been using it for 4 years, and I feel very happy with it.
It is an application written in python, that runs on a server and can manage multiple clients on various OSes. I'm currently using Windows XP, Windows 7, Debian, Ubuntu and CentOS build slaves. My projects are C++, and one of them (the end user GUI) is made in Python. But we've also integrated with other frameworks, for other features than GUI.
What is really good about buildbot is that it works by running command lines on slaves. With this, you can do whatever you want. Even on Windows systems to compile using Visual Studio! From these command lines, you get all the output centralized on the server, and accessible.
You may also find alternatives on this site that references many of them.
Disclaimer: I looked at it 3 years ago, I don't know if it is still accurate.
Hudson or Jenkins is pretty good.
Jenkins is indeed pretty popular for developing such a custom service, even after all these years, considering the question is already 7 years old.
Felgo also offers a Continuous Integration and Delivery (CI/CD) service for Qt. It supports desktop platforms as well as iOS, Android and embedded targets. The full feature set is described in the blog post.
Disclaimer: I am a software developer at Felgo

looking for scripting language for automated build & deploy

I'll start to write a automated build/deploy script for our software team, and I'm not sure which scripting language or tool to use. I'm always eager to learn something new and improve my value on the current software market, so what language do you propose?
In the past, I used windows batch files, which are kind of ugly to read and script.
Here are few words as of my requirements and environment:
developing under Win XP using Visual
Studio 2008 (C++)
subversion
looking for easy to learn & use
scripting language
programming experience in PHP & Ruby & C++
I want the script to
checkout
clean & build many projects
check for errors rinse and repeat
until no errors or timeout
run unittests and evaluate results (text parsing)
zip a bunch of dlls/exe and copy to
server
brew a cup of coffee if possible
Thanks for any suggestions. Could be a community wiki since there's no definite answer, not sure about that...
EDIT:
Found those discussions, but they are a little older and perhaps outdated:
How do you automate a Visual Studio build?
Best .NET build tool
I'd suggest setting up a CI server (Hudson?) and use this to control all deployments to both your QA and production servers. This forces you to automate all aspects of deployment and ensures that the are no ad-hoc restarts of the system by developers.
I'd further suggest that you consider publishing your build output to a repository manager like Nexus , Artifactory or Archiva. In that way deployment scripts could retrieve any version of a previous build. The use of a repository manager would enable your QA team to certify a release prior to it's deployment onto production.
Finally, consider one of the emerging deployment automation tools. Tools like chef, puppet, ControlTier can be used to further version control the configuration of your infrastructure.
It was briefly mentioned, I like PERL for these sorts of things. On an absolutely humongous project I worked on, we had perl scripts practically running the entire build process. It even built classes based upon messaging templates. It was pretty cool, and this was a Windows project to boot.
CPAN provides an enormous resource.
HTH
I would recommend python for this sort of generic scripting task; it's a relatively easy language to learn and very flexible.
In particular, you would use the subprocess module to call all the external programs that you need; it makes capturing their output and controlling them very straightforward.
I'm currently using Apache Ant combined with MPC (home brewed cross platform project) after successfully using the combination at one of my previous jobs, though XML does not quite qualify as a scripting language. But except for the cup of coffee it can do everything on your list. MPC is written in Perl and it's pretty flexible e.g. it allows you to specify postbuild and prebuild actions for VS projects.
EDIT: I was just browsing the site and stumbled on this question; see the answer about
FinalBuilder (I'm considering giving it a try; you'd have to pay for it though)

open source dev environment for C++: what's better? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to do some coding in my spare time, but the thing is, I don't want to spend the money on this.
Would the following set of development tools be The Right Thing, or is there something I'm forgetting?
Eclipse for C++
SVN for source control
Qt for UI development (since it's C++, and I believe it's now opened by Nokia)
hudson for continuous integration
I'd like to write a little image processing application that can run on any platform, but the main platform at the moment will be Windows with a possible movement to the Mac-- hence all the cross-platform tools.
Is there anything really obvious I'm forgetting? Like something like fxcop for style checking in C++?
If I use any libraries, I'd like to avoid GPL libraries; if things go south with my current employer, I'll want to monetize this.
Microsoft Visual C++ Express is free and easily the best IDE for Windows. Furthermore, you can use it to work on cross-platform code - it more depends on writing standards-adhering code and using portable libraries.
If you want to write cross-platform code, I recommend a cross-platform build tool. I use CMake, which generates Visual Studio solutions on Windows, but there are others too, such as SCons.
As for libraries, it depends on what exactly you need to do. Qt is an excellent GUI library. libpng/libjpeg and others are good for loading/saving images at a low level, but there are probably other higher-level image libraries as well.
[edit] A response to the comment about MSVC and Qt:
A quick search brings up Trolltech's Qt Visual Studio Integration page:
Qt Visual Studio .NET Integration
A comment points out that this is actually not free (a free addon is available at this link, but this runs Qt designer outside of Visual Studio. Also, the Express version of Visual Studio does not support plugins.
For coding specifically in Qt there is another new IDE created by Qt: Qt Creator. I've heard good things about it, and it is also portable across Windows, Linux, and Mac.
I detect procrastination (something I'm often guilty of) - just write some code - you can always add tools as you go along.
The problem with questions with phrases like "what's better" is that it's really hard to determine what's right in a specific situation and maybe impossible what's "better".
Said that, I use Eclipse CDT sucessfully as an IDE on Linux. I use frameworks like ACE/TAO to create code that is highly portable.
I know that QT is a very good UI framework. KDE is built on top of KDE and if you use KDE/Linux then you may also want to look at KDevelop, a C++ IDE that has many users.
In the end I believe that you and only you can figure out whats best for you to use. Make sure you check the alternatives and then make an educated decision.
for c++ there are a few more freewares available such as codeblocks and devcpp. I find eclipse very heavy on the machine.
There are many tools that make the difference:
A C++ compiler ... (it wasn't in your list)
doxygen
STLfilt (which is a must have when programming in C++)
A UT framework (CxxTests, boost.test, Fructose, google.test, ...)
something to manage the compilation chain (scons, aap, (b)jam, cmake, ...) -- I've no idea what eclipse is using.
Source control: git. It's not as diffucult as people make it seem. I'm an svn newbie and I still managed to learn the basics of git for use in everyday life! There are about 4 or 5 basic commands that will get you going in no time. Read the official git tutorial
Regarding IDE's, there are a few choices
Microsoft Visual C++ Express Edition (free lite version)
Eclipse with CDT
QtCreator. (Since you're using Qt for the GUI)
Personally I have used Eclipse+CDT for a number of projects. Paired with wxWidgets it has provided me with enough to keep myself pretty much crossplatform (which I think is a big plus).
Also QT has some interesting releases with an IDE now, make sure you check it out: http://www.qtsoftware.com/products/developer-tools
Like earlier suggestion, just start coding, you will eventually find out what is the appropriate mix for you. It varies greatly between individuals what is the "best" IDE or mix of command line tools, etc.
Eclipse CDT is making huge strides, and even organizations that were unx tools only are now finally joining the IDE bandwagon. Considering downloading a current milestone, not the official release.
If you're using windows, don't use Eclipse directly, find a third-party distribution that already has all the GNU tools in it (I forgot the name, I can look it up).
Once you switch to mac it's easier, but make sure to install xcode to get your GNU tools.
If you are using svn - VisualSVNServer is an excellent free GUI based way to setup and administer your SVN repository, definitely worth checking out as it means you have little/no messing about with config files etc. to change your repository.
Regarding version control - Subversion is pretty much standard and is very well supported. From what I've heard, Git is more powerful but harder to use; it's worth a look for a new one-man project, since you wouldn't have the support and retraining concerns that other projects would have.
Regarding IDE, since Visual C++ Express is currently the highest-voted answer - I've used both Eclipse and Visual C++ Express. I don't have a whole lot of experience with Visual C++ Express, so it might have features that I've overlooked, but from what I've been able to compare, Eclipse offers a lot more features. I tried to list its more impressive features in this answer; from what I've been able to see, Visual C++ Express doesn't have any of the features listed there. Eclipse is slower and more resource-intensive, but with a fast enough desktop, its extra features are more than worth it.
In terms of version control, use git and throw your project on GitHub or Gitorious. There's really no reason to use Subversion anymore, due to its painful branching and merging, and lack of a distributed model.
See this link here for why Git is better than X:
http://whygitisbetterthanx.com/
There's also no point in using Sourceforge or GNU Savannah, as the Git front-end sites have much more valuable features and are easier to use.

What toolchains exist for Continuous Integration with C++?

Continuous Integration toolchains for .NET, Java, and other languages are relatively well defined, but the C++ market seems to have a lot of diversity.
By CI "toolchain" I specifically mean tools for the build scripts, automated testing, coding standards checking, etc.
What are C++ teams using for CI toolchains?
Another option might be buildbot.
It's written in python, but is not just for python apps. It can execute any script for doing your build. If you look at their success stories, there appear to be a wide variety of languages.
We implemented our C++ cross platform continous integration infrastructure using Parabuild
http://www.viewtier.com/products/parabuild/screenshots.htm
We were able to integrate every sort of Win/Mac/Linux QA tool with it and it's really easy to install and maintain: it's one click installation on every platform and the web interface is very handy.
While evaluating several continous integration servers the main problem was that they were Java-biased: Parabuild, on the other hand, fits well in the C++ cross platform development and QA workflow
Visual Build Professional is my favorite tool for pulling together all the other tools. Windows only, of course, but it integrates with all flavors of Visual Studio and a host of test tools, source controls tools, issue trackers, etc. It is windows only, though. I know that's not the entire stack, but it's a start.
G'day,
We actually faced this problem at a site where I was contracting previously.
One bloke sat down and wrote tools, mainly shell scripts, to
check out the current code base every hour or so and do a build to check if it was broken, and
check out the latest good build and do a complete build and run about 8,000 regression tests.
We just couldn't find anything commercially available to do this and so Charlie sat down and wrote this in bash shell scripts and it was running on HP-UX.
cheers,
Rob
As with seemingly every other task in C++, I'm just barely limping along with continuous integration. My setup starts with Eclipse. I set it to generate make files for my projects. I have ant scripts that do the overall build tasks by running 'make all' or 'make clean' on the appropriate makefiles. These ant scripts are part of my project, and I have to update them when I add a new build configuration or a new piece to the system. It's not that bad though.
I use CruiseControl to actually run the builds. Each project (all one of them) has an ant script of its own that performs build specific tasks (copying artifacts, processing results), calling into the project ant script to do the building.
I had to use cppunit for my testing and process the results with an xslt file I found somewhere. I also have the wrong svn revision label on each build because I can't find a suitable svn labeler. All I can find is half-completed years-old code and people arguing that other people are doing it wrong.
It looks to me like CC is a dying system, but I haven't found anything better for C++. Then again, I also feel like C++ is a dying language, so maybe it's bigger than just this.
We used scons for continuous integration run by a central build server. Some projects migrated to buildbot.
I'm now getting into rake and considering solutions as surveyed in this blog. Fowler mentions that ThoughtWorks occasionally use rake for their build scripting in his Continuous Integration article.