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

2009-12-04 Thread Bill Hoffman

Rodolfo Lima wrote:

Michael Wild escreveu:

I once wrote a cmake-macro which created these symlink trees (only for
the headers, though). It was a huge PITA. With such symlink trees you
can never be really sure that they are consistent with the source tree.


I think I'm convinced now. The truth is: I've always worked with
in-source build trees (always == 15+ years), having changed to
out-of-source like 3 weeks ago because of the usual issues of the
former. It's a little difficult to change 15+ years habits but I think I
have now good reasons and tools to help.




Thanks for offering to help out with CMake.  It was a good discussion. 
We (meaning someone besides me) should probably create some sort of wiki 
entry as a result.  The entry could have various tips for setting up 
editors to handle out of source builds in a nice way.   I come from the 
opposite end of the spectrum having used CMake for almost 10 years now, 
I am quite used to out of source builds.


Thanks again, and if you have cycles for CMake work, there are plenty of 
bugs in the bug tracker... :)


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-04 Thread Rodolfo Lima
Michael Wild escreveu:
> I once wrote a cmake-macro which created these symlink trees (only for
> the headers, though). It was a huge PITA. With such symlink trees you
> can never be really sure that they are consistent with the source tree.

I think I'm convinced now. The truth is: I've always worked with
in-source build trees (always == 15+ years), having changed to
out-of-source like 3 weeks ago because of the usual issues of the
former. It's a little difficult to change 15+ years habits but I think I
have now good reasons and tools to help.


Best regards,
Rodolfo Lima

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-04 Thread Jed Brown
On Thu, 03 Dec 2009 18:17:21 -0200, Rodolfo Schulz de Lima 
 wrote:
> How does emacs know all the project files? Or it is only looking
> backwards on the include list (this would only find header files)?

M-x visit-tags-table

I have a cmake command to generate tags in the *source* directory, I run
it from any build directory.  For semantic analysis, see
ede-cpp-root-project.  I would like to see this scraped from CMake to
automatically pick up config.h, currently I just point it at the
config.h in a representative build directory.

> I think that there's a misunderstanding here. I'm not for in-source
> builds, quite the contrary. I just want to have my source files
> symlinked inside the out-of-build tree. Maybe we must come with another
> term for this kind of tree (symlink tree looks good). This wouldn't
> limit yourself to one configuration. You would have all benefits of both
> worlds, in-source and out-source build trees.

I don't want any tools to think that the source file is associated with
a particular build.  I change configurations
{ompi,mpich2}{real,complex}{debug,opt} all the time and having the
editor think it was looking at different files would be a disaster.

Jed
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-04 Thread Michael Wild


On 3. Dec, 2009, at 23:23 , Rodolfo Lima wrote:


John Drescher escreveu:

install screen


Thanks for the tip but that's not my point in this whole thread (i.e.
I'm not looking for solutions, I'm giving one).

CMake does so much complicate things to make working with software
projects a seamless experience across different platforms that I doubt
that automatically managing a symlink tree is such a huge effort.


I once wrote a cmake-macro which created these symlink trees (only for  
the headers, though). It was a huge PITA. With such symlink trees you  
can never be really sure that they are consistent with the source tree.


Why make things complicated when you have such a simple option as  
having two terminals open? If you're using GNU screen, you can even  
split your terminal into several, individually sized windows. As an  
added plus, you don't "cross-pollute" your command line histories.  
When I'm in editing mode, I don't want to crawl through build  
commands, and vice versa.


My 2c...

Michael
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Lima
Andreas Pakulat escreveu:
> That doesn't work good enough. CMake doesn't prohibit referencing files
> from all over the project tree, so if I update foo/CMakeLists.txt, that
> might need symlink changes over at bar/... So a complete tree-update
> is needed unless CMake wants to keep track of the "last" version of the
> cmake files and then using the diff between last and current trying to
> find out which files where added/remove. And that is quite a lot of work
> to implement. 

I see, thanks for the explanation. Since my own projects aren't that
complicated, I guess I'll try to write a cmake macro that tries to
accomplish what I want and see how it goes. At least it will work on
simpler (but common enough) cases.

> This isn't as easy as doing a cp -rl /* /...

Unfortunately.

Regards,
Rodolfo Lima.

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread David Cole
On Thu, Dec 3, 2009 at 5:55 PM, Bill Hoffman wrote:

> Rodolfo Lima wrote:
>
>> John Drescher escreveu:
>>
>>> install screen
>>>
>>
>> Thanks for the tip but that's not my point in this whole thread (i.e.
>> I'm not looking for solutions, I'm giving one).
>>
>> CMake does so much complicate things to make working with software
>> projects a seamless experience across different platforms that I doubt
>> that automatically managing a symlink tree is such a huge effort.
>>
>> You know, there's workarounds for everything. Before cmake I wrote a gcc
>> wrapper to make its output look like what cmake does to it. If this
>> wasn't implemented in cmake and I come up with this idea, people would
>> say "but you can write a wrap to gcc to filter its output, why bother?".
>>
>> That's how I see some suggestions in this thread. IMHO cmake came to be
>> when people were sick of workarounds (like autotools) to manage
>> projects. So why resort to workarounds like we used to do when better,
>> seamless solutions exist? (I'm talking in the point of view of someone
>> that doesn't use IDE's).
>>
>>  I just think we already have a solution for out of source builds.  The
> symlink approach is yet another way to do the get the same thing done. There
> are tools out there that create sym-link trees (I can not remember the name,
> but I saw it once...)   Basically, I think this is a can of worms that we
> can do without as it does not really add that much.  I also think you
> underestimate the complexity and support of this feature.
>

I agree with Bill -- it's a can of worms. Anybody who has a significantly
large source tree will just jump up and down and scream and yell for a way
to turn this 'symlink feature' off if somebody did implement it in CMake.
Nobody wants CMake to be any slower than necessary, and implementing a
feature like this would certainly slow it down...

David
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

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

2009-12-03 Thread Bill Hoffman

Rodolfo Lima wrote:

John Drescher escreveu:

install screen


Thanks for the tip but that's not my point in this whole thread (i.e.
I'm not looking for solutions, I'm giving one).

CMake does so much complicate things to make working with software
projects a seamless experience across different platforms that I doubt
that automatically managing a symlink tree is such a huge effort.

You know, there's workarounds for everything. Before cmake I wrote a gcc
wrapper to make its output look like what cmake does to it. If this
wasn't implemented in cmake and I come up with this idea, people would
say "but you can write a wrap to gcc to filter its output, why bother?".

That's how I see some suggestions in this thread. IMHO cmake came to be
when people were sick of workarounds (like autotools) to manage
projects. So why resort to workarounds like we used to do when better,
seamless solutions exist? (I'm talking in the point of view of someone
that doesn't use IDE's).

I just think we already have a solution for out of source builds.  The 
symlink approach is yet another way to do the get the same thing done. 
There are tools out there that create sym-link trees (I can not remember 
the name, but I saw it once...)   Basically, I think this is a can of 
worms that we can do without as it does not really add that much.  I 
also think you underestimate the complexity and support of this feature.


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Andreas Pakulat
On 03.12.09 18:03:56, Rodolfo Schulz de Lima wrote:
> Andreas Pakulat wrote:
> > See my other mail, there's no way for cmake to find out which symlinks
> > are dead links, except by scanning all source files on a cmake run.
> > Thats a huge waste of time, especially on bigger projects with a few
> > thousand files scattered over a few hundered directories.
> 
> I don't think this is the best approach. I would only check the symlinks
> generated by modified CMakeLists.txt's. If the user adds,renames or
> deletes a source file, he would be required to change CMakeLists.txt to
> reflect his actions. This would trigger a symlink update when cmake
> processes it during build tree update. This update would be local, not
> involving the whole tree. Unless I'm missing something obvious, that is.

That doesn't work good enough. CMake doesn't prohibit referencing files
from all over the project tree, so if I update foo/CMakeLists.txt, that
might need symlink changes over at bar/... So a complete tree-update
is needed unless CMake wants to keep track of the "last" version of the
cmake files and then using the diff between last and current trying to
find out which files where added/remove. And that is quite a lot of work
to implement. 

This isn't as easy as doing a cp -rl /* /...

Andreas

-- 
A visit to a strange place will bring fresh work.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Andreas Pakulat
On 03.12.09 20:23:36, Rodolfo Lima wrote:
> John Drescher escreveu:
> > install screen
> 
> Thanks for the tip but that's not my point in this whole thread (i.e.
> I'm not looking for solutions, I'm giving one).
> 
> CMake does so much complicate things to make working with software
> projects a seamless experience across different platforms that I doubt
> that automatically managing a symlink tree is such a huge effort.
> 
> You know, there's workarounds for everything. Before cmake I wrote a gcc
> wrapper to make its output look like what cmake does to it. If this
> wasn't implemented in cmake and I come up with this idea, people would
> say "but you can write a wrap to gcc to filter its output, why bother?".
> 
> That's how I see some suggestions in this thread. IMHO cmake came to be
> when people were sick of workarounds (like autotools) to manage
> projects. So why resort to workarounds like we used to do when better,
> seamless solutions exist? (I'm talking in the point of view of someone
> that doesn't use IDE's).

Well, IMHO adding symlinks for source files to a _buildtree_ is exactly
such a workaround. Its a workaround for editors (or users) that are not
capable of editing in one dir and running make in a different dir.

Andreas

-- 
Your life would be very empty if you had nothing to regret.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Lima
John Drescher escreveu:
> install screen

Thanks for the tip but that's not my point in this whole thread (i.e.
I'm not looking for solutions, I'm giving one).

CMake does so much complicate things to make working with software
projects a seamless experience across different platforms that I doubt
that automatically managing a symlink tree is such a huge effort.

You know, there's workarounds for everything. Before cmake I wrote a gcc
wrapper to make its output look like what cmake does to it. If this
wasn't implemented in cmake and I come up with this idea, people would
say "but you can write a wrap to gcc to filter its output, why bother?".

That's how I see some suggestions in this thread. IMHO cmake came to be
when people were sick of workarounds (like autotools) to manage
projects. So why resort to workarounds like we used to do when better,
seamless solutions exist? (I'm talking in the point of view of someone
that doesn't use IDE's).

[]s,
rod


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Michael Jackson wrote:
> True, but I can always change the "build" to something else if needed
> (like a release). 98% of the time using "Build" works just fine. I think
> there have been lots of great discussions and suggestions in this thread
> that you should be able to find something that works for you.

Indeed, it seems that everyone came up with a way to mitigate the
problem. And sorry to insist on this, but I still think that symlink
trees are easier to work with. Not that the other solutions are bad
(they really aren't). But I often see newcomers doing in-source builds
(because that's what they're used to) and complaining about source tree
pollution, requesting "make distclean", creating two source tree copies,
each one configured to one type of build (been there), etc.

I think that if cmake created symlink trees in first place, all this
fuss of coming up with solutions to work with out-of-source builds, or
complaints about the absence of "make distclean" and the link wouldn't
exist.

Well, it's been an informative thread nonetheless.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Eric Noulard
2009/12/3 Rodolfo Schulz de Lima :
> Eric Noulard wrote:
>> I'm using both vi+make and Eclipse CDT (for C/C++ project using CMake).
>> In fact I was a "pure command line" guy until the noise of mouse click
>> surround me and I decided to give a try to IDE way to see the code :-)
>
> I went into the opposite direction, from mouse to keyboard, never to
> look back :)

Now I do use both depending on the task and the situation
(sometime you do not have more than a bare terminal)

>> When I'm in the vi+make mode I usually have 2 terminals
>> (or two tabs in the same terminal)
>
> That's one way do deal with it, but since I use xterm I don't have tabs,
> and my monitor is a 17" 4:3, so screen space it rare. Dude... I need
> some serious tools and hardware upgrades :)

We are now far from CMake topic but in this case I think you may
open 2 xterms and switch xterms using your favorite keyboard shortcut
(Ctrl-Tab or whatever) this scheme is even usable with Alt+F1/F2/Fi
with "pure console" (linux case).

The terminal switching solution may even be as fast as hitting ":!" keys
for vi command lines access.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread John Drescher
> That's one way do deal with it, but since I use xterm I don't have tabs,
> and my monitor is a 17" 4:3, so screen space it rare. Dude... I need
> some serious tools and hardware upgrades :)
>

install screen

http://www.gnu.org/software/screen/

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Eric Noulard wrote:
> I'm using both vi+make and Eclipse CDT (for C/C++ project using CMake).
> In fact I was a "pure command line" guy until the noise of mouse click
> surround me and I decided to give a try to IDE way to see the code :-)

I went into the opposite direction, from mouse to keyboard, never to
look back :)

> When I'm in the vi+make mode I usually have 2 terminals
> (or two tabs in the same terminal)

That's one way do deal with it, but since I use xterm I don't have tabs,
and my monitor is a 17" 4:3, so screen space it rare. Dude... I need
some serious tools and hardware upgrades :)

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Michael Jackson
True, but I can always change the "build" to something else if needed  
(like a release). 98% of the time using "Build" works just fine. I  
think there have been lots of great discussions and suggestions in  
this thread that you should be able to find something that works for  
you.


I envy the distributed GCC folks who do -j50. ;-)

--
Mike Jackson 

PS: Had to use an old single CPU PPC the other day.. Painful going  
from a Dual Xeon 5500 to a 1.25GHz ppc..


On Dec 3, 2009, at 3:46 PM, Rodolfo Schulz de Lima wrote:


Michael Jackson wrote:

cmake -C ${workspace_loc}/${project_name}/Build -j 16 VERBOSE=1

And the executables (as setup in the Cmake files) are always built  
into

Build/Bin.


This way you can only have one build tree per project. One way to  
extend

it is to use something like "Build_${build_type}" and set up variables
accordingly. But, IMHO, symlink trees are simpler to work with.

[]s.
rod

PS: I envy your -j16 :)

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Eric Noulard wrote:
> Cscope is another light and fast (compared to IDE) alternative

Thanks Eric, I'm gonna check this one out. I've heard of it but never tried.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Michael Jackson wrote:
> cmake -C ${workspace_loc}/${project_name}/Build -j 16 VERBOSE=1
> 
> And the executables (as setup in the Cmake files) are always built into
> Build/Bin.

This way you can only have one build tree per project. One way to extend
it is to use something like "Build_${build_type}" and set up variables
accordingly. But, IMHO, symlink trees are simpler to work with.

[]s.
rod

PS: I envy your -j16 :)

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Eric Noulard
2009/12/3 Rodolfo Schulz de Lima :
> Michael Jackson wrote:
>> I guess those of us that use IDEs like Visual Studio, Eclipse, NetBeans,
>> Xcode, CobeBlocks, QtCreator may not see the issue you are trying to
>> solve.
>
> That's precisely it, I'm use an old-school setup, Vi + make, and my idea
> would certainly be helpful in this case.

I'm using both vi+make and Eclipse CDT (for C/C++ project using CMake).
In fact I was a "pure command line" guy until the noise of mouse click
surround me and I decided to give a try to IDE way to see the code :-)

When I'm in the vi+make mode I usually have 2 terminals
(or two tabs in the same terminal)

1) one for compiling/executing (all command line)
2) second one for editing (with vi)

That's fine for me, but I think it's an habit of mine.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Eric Noulard
2009/12/3 Jed Brown :
> On Thu, 03 Dec 2009 16:26:19 -0200, 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.
>
> See etags/ctags (this is ancient technology).  Also semantic (part of
> cedet for emacs) does semantic analysis so it can jump more
> intelligently between files (i.e. determine the type of a variable and
> jump to the appropriate definition).

Cscope is another light and fast (compared to IDE) alternative
http://cscope.sourceforge.net/
cscope is a kind of old-school age too:
"Joe Steffen first started writing cscope in the early 1980's [...] on
on a PDP-11"

Works nicely from within emacs/xemacs using xscope
Works with vim too: http://cscope.sourceforge.net/cscope_vim_tutorial.html

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Michael Jackson



On Dec 3, 2009, at 3:11 PM, Rodolfo Schulz de Lima wrote:


I'm interested to know how they manage this. But even with if you run
make with -C to change to the build directory, the executable would be
generated there. This feels awkward when you are used to in-source
builds. Inside vi I usually do ":make" then ":!./progname".


So, eclipse is this way. It wants to look for the makefiles in the  
Source directory. As a matter of consistency I ALWAYS name my build  
directories "Build". So in Eclipse I have the following:


cmake -C ${workspace_loc}/${project_name}/Build -j 16 VERBOSE=1

And the executables (as setup in the Cmake files) are always built  
into Build/Bin.


so I guess you could do
":make -C Build"
":!./Build/Bin/progname"

It is all about being consistent.

--
Mike Jackson
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Jed Brown wrote:
> I use command-find-tag "M-." and enter (a) part of the file name (not
> including the path) or (b) part of the function name, with tab
> completion, or (c) part of the struct name also with tab completion, and
> it takes me to the definition.  No need to enter paths, and this works

How does emacs know all the project files? Or it is only looking
backwards on the include list (this would only find header files)?

> I don't see how an in-source build would make any of this easier, but it
> would limit me to one configuration.

I think that there's a misunderstanding here. I'm not for in-source
builds, quite the contrary. I just want to have my source files
symlinked inside the out-of-build tree. Maybe we must come with another
term for this kind of tree (symlink tree looks good). This wouldn't
limit yourself to one configuration. You would have all benefits of both
worlds, in-source and out-source build trees.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Andreas Pakulat wrote:
> 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'm interested to know how they manage this. But even with if you run
make with -C to change to the build directory, the executable would be
generated there. This feels awkward when you are used to in-source
builds. Inside vi I usually do ":make" then ":!./progname".

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

Although I understand that it's not trivial to manage the symlinks, I
wouldn't call it "a huge stack of problems". And if you make the symlink
tree generation optional, only those interested will be benefited.

> 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.

I don't think it's the only way to do it. I think I've replied your
other message about this issue.

Regards,
Rodolfo Lima

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Jed Brown
On Thu, 03 Dec 2009 16:59:01 -0200, Rodolfo Schulz de Lima 
 wrote:
> Hi Jed, I know about ctags and the like, but I'm don't use them (but I
> should). But these tools cover only a part of the problem. If you want
> to go to another file and there's no useful context around the current
> file position to make you go there, you would have to explicitly enter
> the file name.

I use command-find-tag "M-." and enter (a) part of the file name (not
including the path) or (b) part of the function name, with tab
completion, or (c) part of the struct name also with tab completion, and
it takes me to the definition.  No need to enter paths, and this works
across projects and can look into system headers if you like.  To build,
I give "M-x compile" and use "make -C /path/to/build/ target", and
subsequently "M-x recompile", for debugging, "M-x gdb"

  mpiexec -n 1 gdb -i=mi --args /path/to/build/src/tests/trouble args : -n 3 
/path/to/build/src/tests/trouble args

(rank 0 of a 4-process job)

I don't see how an in-source build would make any of this easier, but it
would limit me to one configuration.

Jed
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Andreas Pakulat wrote:
> See my other mail, there's no way for cmake to find out which symlinks
> are dead links, except by scanning all source files on a cmake run.
> Thats a huge waste of time, especially on bigger projects with a few
> thousand files scattered over a few hundered directories.

I don't think this is the best approach. I would only check the symlinks
generated by modified CMakeLists.txt's. If the user adds,renames or
deletes a source file, he would be required to change CMakeLists.txt to
reflect his actions. This would trigger a symlink update when cmake
processes it during build tree update. This update would be local, not
involving the whole tree. Unless I'm missing something obvious, that is.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Andreas Pakulat
On 03.12.09 16:54:08, Rodolfo Schulz de Lima wrote:
> Bill Hoffman wrote:
> 
> > And, they can still have that, but I once they get used to it, I bet
> > they will like it...
> 
> Sorry Bill, I think I didn't understand, you mean that they will like to
> have source code in a different directory than Makefile's?
> 
> > Another option might
> > be a tool on top of CMake.  I think there is something that will create
> > sym-link trees.  Then you can just do an in-source build in the sym-link
> > tree version.
> 
> That's what I've meant in the first place (but it's better stated now).
> But I object the idea of it being a tool on top of CMake. This sym-link
> trees could be created and maintained by CMake itself when the user
> updates the CMakeLists.txt. Maybe a command line parameter could trigger
> this machinery.

See my other mail, there's no way for cmake to find out which symlinks
are dead links, except by scanning all source files on a cmake run.
Thats a huge waste of time, especially on bigger projects with a few
thousand files scattered over a few hundered directories.

Andreas

-- 
Avert misunderstanding by calm, poise, and balance.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Andreas Pakulat
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.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Jed Brown wrote:
> See etags/ctags (this is ancient technology).  Also semantic (part of
> cedet for emacs) does semantic analysis so it can jump more
> intelligently between files (i.e. determine the type of a variable and
> jump to the appropriate definition).

Hi Jed, I know about ctags and the like, but I'm don't use them (but I
should). But these tools cover only a part of the problem. If you want
to go to another file and there's no useful context around the current
file position to make you go there, you would have to explicitly enter
the file name.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Bill Hoffman wrote:

> And, they can still have that, but I once they get used to it, I bet
> they will like it...

Sorry Bill, I think I didn't understand, you mean that they will like to
have source code in a different directory than Makefile's?

> Another option might
> be a tool on top of CMake.  I think there is something that will create
> sym-link trees.  Then you can just do an in-source build in the sym-link
> tree version.

That's what I've meant in the first place (but it's better stated now).
But I object the idea of it being a tool on top of CMake. This sym-link
trees could be created and maintained by CMake itself when the user
updates the CMakeLists.txt. Maybe a command line parameter could trigger
this machinery.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Michael Jackson wrote:
> I guess those of us that use IDEs like Visual Studio, Eclipse, NetBeans,
> Xcode, CobeBlocks, QtCreator may not see the issue you are trying to
> solve.

That's precisely it, I'm use an old-school setup, Vi + make, and my idea
would certainly be helpful in this case.

>   Source Code Control: You don't have build products interspersed in the
> source code which then causes you to put all sorts of "ignore" rules for
> your SCM system

>   Is the build "really clean" - Wanna make sure your project is
> completely cleaned of build products, just wipeout the build directory.
> Too many times on an "autoconf" system there are left over files that
> get missed and end up screwing up subsequent builds.
>   Backups - If you stick to a consistent naming scheme telling your
> favorite backup program to ignore the build directory is simple.

I understand that these are the main benefits of out-of-source builds in
general, not only the case where build directories are embedded in
source directories. I'm not against it, quite the contrary. I just want
to make out-of-source builds "feel" like "inside-source" builds.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Jed Brown
On Thu, 03 Dec 2009 16:26:19 -0200, 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.

See etags/ctags (this is ancient technology).  Also semantic (part of
cedet for emacs) does semantic analysis so it can jump more
intelligently between files (i.e. determine the type of a variable and
jump to the appropriate definition).

Jed
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Bill Hoffman

Rodolfo Schulz de Lima wrote:

On Thu, Dec 03, 2009 at 12:41:59PM -0500, Bill Hoffman wrote:

Tools like emacs and other build tools can be taught how to deal with
the sources not being right there.   The symlinks will likely be a pain
to maintain.   What happens when a file is removed in the source tree?
Who updates the symlinks?  I guess every time CMake is run it could
remove them all, and recreate them.  Or it could just collect dead
links...  It sounds kind of complicated.


Well, CMake already does some complicated tricks (that's a compliment!).
I've made a talk about CMake yesterday to an audience of computer graphics
researchers and when I presented the notion of 'out-of-source builds' I
saw some blank stares when I said the source files just wouldn't be there
where the Makefile is (that's what they are used to).

And, they can still have that, but I once they get used to it, I bet 
they will like it...

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.

There are emacs things you can do so that M-x compile in the Source tree 
will automatically cd to the build directory and do the build.  Then you 
can stay in the source tree for edits and builds.   Another option might 
be a tool on top of CMake.  I think there is something that will create 
sym-link trees.  Then you can just do an in-source build in the sym-link 
tree version.


-Bill
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Michael Jackson


_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio

On Dec 3, 2009, at 1:18 PM, Rodolfo Schulz de Lima wrote:


Michael Jackson wrote:

I'll throw a "no" vote on that but what I would like to hear is some
more detail from Rodolfo explaining why he thinks he needs this? Have
you tried embedding the build directory inside the source directory?
Some of us use this type of setup and it seems to work really nicely
with IDEs, Text Editors, and the terminal?


Hi Michael, I've already replied with some 'details' you wanted.
About this idea of creating the build directory inside the source
directory, how this makes things better other than always referencing
the source files with "../"?

Regards,
Rodolfo Lima



I guess those of us that use IDEs like Visual Studio, Eclipse,  
NetBeans, Xcode, CobeBlocks, QtCreator may not see the issue you are  
trying to solve. In each of those programs you can simply "right- 
click" on a variable, Class name, or include file and "Jump To  
Definition". I would think Emacs has some sort of plugin or script or  
something that can emulate this type of behavior. I do agree that if  
you are relegated to a terminal only environment (common on HPC  
machines) then out of source builds can be "interesting" at times but  
the benefits, at least for me, out weigh the disadvantages:
  Source Code Control: You don't have build products interspersed in  
the source code which then causes you to put all sorts of "ignore"  
rules for your SCM system
  Is the build "really clean" - Wanna make sure your project is  
completely cleaned of build products, just wipeout the build  
directory. Too many times on an "autoconf" system there are left over  
files that get missed and end up screwing up subsequent builds.
  Backups - If you stick to a consistent naming scheme telling your  
favorite backup program to ignore the build directory is simple.



Respectfully
Mike Jackson
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
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.

[]s,
rod

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima

On Thu, Dec 03, 2009 at 12:41:59PM -0500, Bill Hoffman wrote:
> Tools like emacs and other build tools can be taught how to deal with
> the sources not being right there.   The symlinks will likely be a pain
> to maintain.   What happens when a file is removed in the source tree?
> Who updates the symlinks?  I guess every time CMake is run it could
> remove them all, and recreate them.  Or it could just collect dead
> links...  It sounds kind of complicated.

Well, CMake already does some complicated tricks (that's a compliment!).
I've made a talk about CMake yesterday to an audience of computer graphics
researchers and when I presented the notion of 'out-of-source builds' I
saw some blank stares when I said the source files just wouldn't be there
where the Makefile is (that's what they are used to).

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.

Well, that's only an idea :)

Best regards,
Rodolfo Lima

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread John Drescher
On Thu, Dec 3, 2009 at 1:18 PM, Rodolfo Schulz de Lima
 wrote:
> Michael Jackson wrote:
>> I'll throw a "no" vote on that but what I would like to hear is some
>> more detail from Rodolfo explaining why he thinks he needs this? Have
>> you tried embedding the build directory inside the source directory?
>> Some of us use this type of setup and it seems to work really nicely
>> with IDEs, Text Editors, and the terminal?
>
> Hi Michael, I've already replied with some 'details' you wanted.

Your reply must not have hit the list as I do not see it.

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Schulz de Lima
Michael Jackson wrote:
> I'll throw a "no" vote on that but what I would like to hear is some
> more detail from Rodolfo explaining why he thinks he needs this? Have
> you tried embedding the build directory inside the source directory?
> Some of us use this type of setup and it seems to work really nicely
> with IDEs, Text Editors, and the terminal?

Hi Michael, I've already replied with some 'details' you wanted.
About this idea of creating the build directory inside the source
directory, how this makes things better other than always referencing
the source files with "../"?

Regards,
Rodolfo Lima

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Michael Jackson
I'll throw a "no" vote on that but what I would like to hear is some  
more detail from Rodolfo explaining why he thinks he needs this? Have  
you tried embedding the build directory inside the source directory?  
Some of us use this type of setup and it seems to work really nicely  
with IDEs, Text Editors, and the terminal?


---
Mike Jackson www.bluequartz.net

On Dec 3, 2009, at 12:41 PM, Bill Hoffman wrote:


Rodolfo Lima wrote:
Hi people, I was thinking if it would be nice if cmake created  
symlinks

on supported platforms of source files into CMAKE_CURRENT_BINARY_DIR
when it differs from CMAKE_CURRENT_SOURCE_DIR. My only complaint  
against
out-of-source builds is that the sources aren't around when I do  
make.

This feature would help a lot.
Since I've got some time to spare, if this shows to be useful to more
people I could try to implement it and forward the patch upstream.


I am not sure I like this idea...  :)


Tools like emacs and other build tools can be taught how to deal  
with the sources not being right there.   The symlinks will likely  
be a pain to maintain.   What happens when a file is removed in the  
source tree? Who updates the symlinks?  I guess every time CMake is  
run it could remove them all, and recreate them.  Or it could just  
collect dead links...  It sounds kind of complicated.


-Bill

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Bill Hoffman

Rodolfo Lima wrote:

Hi people, I was thinking if it would be nice if cmake created symlinks
on supported platforms of source files into CMAKE_CURRENT_BINARY_DIR
when it differs from CMAKE_CURRENT_SOURCE_DIR. My only complaint against
out-of-source builds is that the sources aren't around when I do make.
This feature would help a lot.

Since I've got some time to spare, if this shows to be useful to more
people I could try to implement it and forward the patch upstream.



I am not sure I like this idea...  :)


Tools like emacs and other build tools can be taught how to deal with 
the sources not being right there.   The symlinks will likely be a pain 
to maintain.   What happens when a file is removed in the source tree? 
Who updates the symlinks?  I guess every time CMake is run it could 
remove them all, and recreate them.  Or it could just collect dead 
links...  It sounds kind of complicated.


-Bill

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


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

2009-12-03 Thread Rodolfo Lima
Hi people, I was thinking if it would be nice if cmake created symlinks
on supported platforms of source files into CMAKE_CURRENT_BINARY_DIR
when it differs from CMAKE_CURRENT_SOURCE_DIR. My only complaint against
out-of-source builds is that the sources aren't around when I do make.
This feature would help a lot.

Since I've got some time to spare, if this shows to be useful to more
people I could try to implement it and forward the patch upstream.

Regards,
Rodolfo Lima

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake