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

Andreas Pakulat apaku at gmx.de
Thu Dec 3 17:53:25 EST 2009


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 <srcdir>/* <builddir>/...

Andreas

-- 
A visit to a strange place will bring fresh work.


More information about the CMake mailing list