On Wednesday 29 May 2013, Matthew Woehlke wrote:
> On 2013-05-28 19:50, Wojciech Knapik wrote:
> > Files don't just happen to be lying around in directories. You have to
> > create them in a specific path, with a specific name. Even if the act of
> > creation was performed by another developer, on another machine, that
> > information is written to disk in the course of a VCS checkout.
> 
> IOW, you are claiming that *the VCS* is authoritative. (Personally I
> would claim, at least as things stand now, that CMakeLists.txt is
> authoritative, and any discrepancies with the files on disk represent
> mistakes.)
> 
> ...which (see more below) is actually an interesting idea.
> 
> > The contents of the directory rules. If you remove a file from it,
> > there's nothing you can do in a CMakeList to help it. If you add a file
> > to it and you use GLOBs, there's nothing that you need to do in a
> > CMakeList for it to be built. (*)
> 
> In practice, developers *are* going to create 'scratch' files in source
> directories. Or forget to add new files when committing.
> 
> In the latter case, at least having CMakeLists.txt specifically ask for
> the file will make it much more immediately obvious when this mistake
> happens.
> 
> If there were a way to ask *the VCS* for the file list, I could see that
> being useful; it would avoid the problem with 'scratch' files, and would
> also help prevent forgetting to add files (since the developer would get
> broken functionality at least until staging the addition). But of course
> this would need to degrade gracefully when dealing with release
> tarballs. (Ideally the release tarball would use an explicit list.)


The "Projects" plugin of the kate editor does something like that, it can ask 
svn, git and hg (I think) for the list of files and uses them as "project-
files", which are used e.g. when searching (i.e. this is unrelated to 
building).

Still, also ignoring the tarball case, this is not usable if you have more 
than one target in a directory, you explicitely have to list which file 
belongs where.

Alex
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to