[CMake] Separate object directories on Linux?

Alexander Neundorf a.neundorf-work at gmx.net
Wed Apr 2 18:21:13 EDT 2008


On Thursday 03 April 2008, Hendrik Sattler wrote:
> Am Mittwoch 02 April 2008 schrieb Alexander Neundorf:
> > >  - the eclipse project is totally useless without that option as the
> > > project are about editing the source, not just triggering the build
> > > from a GUI :-/
> >
> > Not really. If you build in-source (which is usually not recommended)
> > everything is just fine. If you build out-of-source, and the build dir is
> > NOT a subdirectory if the source dir, a "linked resource" to the source
> > files is created, so that works then too.
>
> Can the variable be included into the list of variables, seen be ccmake and
> cmake-gui? This way, you don't have to remember it. This can be dependent
> on the position of source and build directory to each other (means: only
> when that option makes sense).
>
> > > Why aren't there options for generators? They could ask about the
> > > Makefile type and about creating that .project file in the source dir.
> > > The current way is really hard to sell to users. The above command line
> > > should be: $ cmake -GEclipse ../certi_src
> > > The CDT4 is irrelevant and even hurts if JDT support for Java is ever
> > > added.
> >
> > I don't know the details, but wouldn't we need a different generator when
> > creating a project file for Java ?
>
> And then you create a mixed project...

Is that possible with Eclipse ?

> No, if possible, it should be "one IDE -> one generator".

Yes, but at least I don't know about the "if possible" here.

> That's why I said that we need generator options, and those should not be
> mixed into the generator name because there is no other way...
> The Makefile generator(s) has/have the same problems. I see this as a
> usability issue.

What was your suggestion ? Maybe some things could be added to cmake-gui.

> > > The WIKI Eclipse entry is also hard to understand: in "Accessing the
> > > Source and Advanced Editing Features", it is not clear wether the extra
> > > definition is needed or not. It is missing a conclusion like: do it
> > > that way and you'll can do anything in Eclipse like normal.
> >
> > It's a wiki, please create an account and improve the wording :-)
>
> The problem is Eclipse knowledge, here. As I said, I didn't get what's the
> way to make that all work. I don't care which one, just not in-source
> (because there is no "make distclean", is that really that hard to
> implement?).

Create your build directory as "sibling" to the source dir and run cmake with 
the Eclipse generator without extra options, then you will get the "linked 
resource" to the source tree in the project view.

Alex


More information about the CMake mailing list