views:

153

answers:

2

I'm in the process of converting a project to Eclipse CDT, it consists of 2 (static) libraries and produces about 12 binaries, a few of the binaries have 2-3 different build configurations, and is built by scons

How should I structure this in an Eclipse workspace ? 1 project for everything ? 1 project for each of the binaries/libs ? Something else ?

+1  A: 

I'd suggest you use CMAKE for this problem, It should be able target target the Eclipse build system. If not, it can generate a normal 'make' config for you. It is far better to go down this route since its more portable in the long term, and writing a hierarchical build system is quite straight forward.

Hassan Syed
Are you Leeeroy's colleague ?
Hassan Syed
idd, yes he is :-)
leeeroy
it can get confusing =D -- using cmake will come with the same set of decisions that you need to make with the eclipse build system. Better to make it portable to other IDE's in one fell swoop.
Hassan Syed
+1  A: 

I personally have used Eclipse CDT before, but only in makefile mode i.e. to build anything I'd manually run the makefile. Basically I used Eclipse as a glorified editor. Here's how I worked things:

Everything part of the otherall solution came under the same workspace. Each library/binary was its own directory and project, so that I could make each as required. I also had a separate folder (project) for tests with a makefile that built all the test exes I wanted to run so I could do valgrinds on simple bits of it.

As I said, I used make and not Eclipse CDT's built-in building routines - to that end I'd say it really doesn't matter how you structure it - do whatever makes sense / conforms best to the UNIX principles.

Ninefingers