[CMake] Source file symlinks on out-of-source builds

Andreas Pakulat apaku at gmx.de
Thu Dec 3 14:47:36 EST 2009


On 03.12.09 16:31:06, Rodolfo Schulz de Lima wrote:
> Rodolfo Schulz de Lima wrote:
> > About emacs/vi, they can locate the source file only if we're going
> > though an error list, as gcc spits out the path to the source files
> > involved. But if you want to load another file, you must do it yourself,
> > which can be irritating sometimes.
> 
> Sorry to reply to my own post. Just to clarify, what I find irritating
> is having to prepend the path to the source file when I want to load it
> inside Vi, instead of just write the file name. If there's another
> easier way to do it, I sure would like to know.

We're using out-of-source builds (custom buildsystem) at work for about
almost a year now. And in fact none of the developers uses an IDE, its
emacs or vi. And none of them ever complained about that particular
problem, I don't know exactly how they manage that (I'm usually having
two terminals, one for building one for editing, but then again I'm not
a big vi or emacs uses). I suppose the CWD for vi/emacs is inside the
sourcedir and they've got a special command set up that would run the
buildtool inside some other (the builddir). 

I really don't see a good enough reason that would outweight the huge
stack of problems you get when starting to symlink stuff.

BTW: I have some experience with buildsystem-scripts using symlinks to
get source files into the builddir (not for editing, but because the
actual buildsystem needs it) and it means that on each update you have
to remove the complete builddir because you cannot be certain wether all
new links are there and all dead ones are removed. The only way for
cmake to do it right would be recursively deleting all symlinks on each
cmake invocation and re-create them.

Andreas

-- 
Never look up when dragons fly overhead.


More information about the CMake mailing list