views:

1281

answers:

6

I am developing under Windows, and using Eclipse with CDT to develop C++ applications.

Now, for build management I can create a normal C++ project and Eclipse will completely manage the build (calling the g++ compiler with proper arguments), or I can create a Managed Make C++ project and Eclipse will manage the Makefile then call make on that Makefile (when building the project) which in turn will complete the build process.

Is there any advantage of using one of these approaches and not the other?

EDIT: I am not talking about Managed Make vs Standard Make, rather I am talking about Make vs Eclipse. Yesterday I tried compiling a C++ project under eclipse on a system that doesn't include Make at all, and the project compiled fine, meaning that eclipse can manage the build completely on it's own, which bring the original question into focus: do I need Make?; I can use eclipse alone.

That's my question...

+3  A: 

I'm not sure if you would have this option in the C++ project, but with the Managed Make C++ project you would be able to call the makefile directly from a command line environment (provided you have mapped the make executable into your path). I would consider this to be a real asset - especially when it comes to automated build scripts and user who are more CLI-centric.

Also - don't forget that writing your own makefile is an option with the CDT. If you have specific requirements you can write your own make and linker files and Eclipse will bind it's build targets to that makefile.

dls
I tried creating a C++ project and noticed that eclipse manages file dependency and, it only builds files that have been changed since last time.Bottom line: Eclipse can manage the build on it's own...
Lawand
Marked up for mentioning automated scripts (or things like Hudson).I want different #define values for Eclipse vs cLI - any idea how?(And how can one write one's own makefile in Eclipse?)
Mawg
+1  A: 

As of CDT4.0 the options are essentially the same. All Standard Make features can be used for the Managed Build Projects and vice a versa.

CDT 4.0 build system changes.

Best cdt4.0 changelog I could find.

RJFalconer
/sigh. A perfectly good decisive answer to your original question, but not to the question in your edit. =(One of these days I'll get an accepted answer...
RJFalconer
A: 

IMO, this depends on your project popularity.
Normally, there is no problems with building Make projects practically on any platform (in windows you may need cygwin/mingw though). Even more, if there will be someone that needs to compile your Eclipse based project, and who is not using Eclipse, he will blame you for your choice.
So, if your project is not intended for the masses (or you really don't care about them), use whatever your prefer. But if the sources is going to be compiled by other people, it could be a good idea to switch to Make.

Andrejs Cainikovs
A: 

It depends a lot on scale of your team and your project. Make is much harder to set up, but can be scaled towards multi-machine builds and large teams independent of Eclipse. Also with Make you'll have more control on the builduing of your project (when you dive into the details of make files), and it can be included in Continuous Integration systems. And your make files can be made platform independent (if this is relevant for you).

In case you build using Eclipse, everything boils down to your project file. If multiple people need to make changes to your project structure (i.e. add/change components) it may be hard on configuration management whereas you'll be fine using make files.

On the other hand: if it is a one- or two person development, Eclipse CDT is propably your fast track as you can skip the time consuming make file setup.

Adriaan
+4  A: 

One consideration is, do you want to require that developers who work with your project must install and use Eclipse? It's not a value judgement about Eclipse, rather an assumption as to your audience and how familiar they are with your chosen tool. If a C++ programmer is familiar with Java/Eclipse it may not be a problem. If they aren't familiar with Eclipse, they are going to see Eclipse as an obstacle to getting their work done.

You need to pay attention to your instructions for putting together a build environment from scratch AND keep it updated. You know developers, There will be some C++ die-hards who will curse your decision and rant about how you should have just done it with Make instead of making (heh) them install a whole new platform just to do a build.

Kelly French
+1  A: 

If you intend to use a continuous build/integration system at some point the makefile could be very helpful

Jay