Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Jean-Christophe Fillion-Robin
Hi Folks, Being able to activate the dynamic globing on a per-directory or per-target or per-glob call basis would be nice. Coupled with "automoc" feature of Qt, that would simplify things greatly. I would be happy to test patches on our large scale project "3DSlicer". See https://github.com/Slic

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Matthew Woehlke
On 2013-05-30 08:47, Wojciech Knapik wrote: Working with make taught me once and for all, that functions like [execute_process] should be avoided whenever possible. A build tool creates files from files via the means of targets. So if you want to use a tool like this effectively, you should use t

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Brad King
Hi Folks, Putting on my list moderation hat, I'd like to terminate the debate in this thread. Arguments on both sides have been hashed out a few times. Whether we all agree or not, some people find source globs useful and it will not be disruptive to CMake to add an option to add dependencies on

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Wojciech Knapik
On Thu, May 30, 2013 at 08:27:28AM +0200, Michael Wild wrote: > Also, very astonishing to me is the fact that after apparently finding > file(GLOB) in the documentation, you clearly didn't read the whole > paragraph. It's right there: > > >> We do not recommend using GLOB to collect a list of

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Wojciech Knapik
On Wed, May 29, 2013 at 04:59:22PM -0400, Matthew Woehlke wrote: > On 2013-05-28 21:23, Wojciech Knapik wrote: > > > On Fri, May 24, 2013 at 11:21:57AM -0400, Matthew Woehlke wrote: > > > >> GLOB is just one of many things that will surprise you when working with > >> CMake if you don't understand

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Wojciech Knapik
On Wed, May 29, 2013 at 04:55:33PM -0400, 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 ano

Re: [cmake-developers] Safe source list GLOBs

2013-05-30 Thread Alexander Neundorf
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

Re: [cmake-developers] Safe source list GLOBs

2013-05-29 Thread Michael Wild
On 29.05.2013 22:59, Matthew Woehlke wrote: > On 2013-05-28 21:23, Wojciech Knapik wrote: >> On Fri, May 24, 2013 at 11:21:57AM -0400, Matthew Woehlke wrote: [...] > >> I do understand the distinction between calling cmake and make and I >> understood from the start when variables are evaluated an

Re: [cmake-developers] Safe source list GLOBs

2013-05-29 Thread Matthew Woehlke
On 2013-05-28 21:23, Wojciech Knapik wrote: On Fri, May 24, 2013 at 11:21:57AM -0400, Matthew Woehlke wrote: GLOB is just one of many things that will surprise you when working with CMake if you don't understand the difference between the configure and build passes. I've written quite a bit of

Re: [cmake-developers] Safe source list GLOBs

2013-05-29 Thread Matthew Woehlke
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 c

Re: [cmake-developers] Safe source list GLOBs

2013-05-28 Thread Wojciech Knapik
On Fri, May 24, 2013 at 11:21:57AM -0400, Matthew Woehlke wrote: > On 2013-05-19 19:47, Wojciech Knapik wrote: > > > I you ever put "junk files" with, say, a .cpp extension in a source tree > > of a C++ project, you're the only one to blame. > > This is not unusual at all. I'm often in the situat

Re: [cmake-developers] Safe source list GLOBs

2013-05-28 Thread Wojciech Knapik
On Thu, May 23, 2013 at 01:13:12PM -0400, David Cole wrote: > > > Explicit lists violate DRY > > > http://en.wikipedia.org/wiki/Don't_repeat_yourself > > No, this doesn't apply :-) > By having some files lying around in a directory I did not state > anything, so I do not repeat myself in the CMa

Re: [cmake-developers] Safe source list GLOBs

2013-05-28 Thread Wojciech Knapik
On Thu, May 23, 2013 at 06:57:34PM +0200, Alexander Neundorf wrote: > > > Explicit lists violate DRY > > > http://en.wikipedia.org/wiki/Don't_repeat_yourself > > No, this doesn't apply :-) > By having some files lying around in a directory I did not state anything, so > I do not repeat myself in

Re: [cmake-developers] Safe source list GLOBs

2013-05-24 Thread Matthew Woehlke
On 2013-05-19 19:47, Wojciech Knapik wrote: I you ever put "junk files" with, say, a .cpp extension in a source tree of a C++ project, you're the only one to blame. This is not unusual at all. I'm often in the situation where I have source files for classes that are works in progress, tangent

Re: [cmake-developers] Safe source list GLOBs

2013-05-23 Thread David Cole
-Original Message- From: Alexander Neundorf To: cmake-developers Sent: Thu, May 23, 2013 12:55 pm Subject: Re: [cmake-developers] Safe source list GLOBs On Thursday 23 May 2013, Wojciech Knapik wrote: On Mon, May 20, 2013 at 01:47:12AM +0200, Wojciech Knapik wrote: > On Wed, May

Re: [cmake-developers] Safe source list GLOBs

2013-05-23 Thread Alexander Neundorf
On Thursday 23 May 2013, Wojciech Knapik wrote: > On Mon, May 20, 2013 at 01:47:12AM +0200, Wojciech Knapik wrote: > > On Wed, May 15, 2013 at 09:50:34AM -0400, Bill Hoffman wrote: > > > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrot

Re: [cmake-developers] Safe source list GLOBs

2013-05-23 Thread Wojciech Knapik
On Mon, May 20, 2013 at 01:47:12AM +0200, Wojciech Knapik wrote: > On Wed, May 15, 2013 at 09:50:34AM -0400, Bill Hoffman wrote: > > > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > > > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > > > > > >> Globs simply do not work well fo

Re: [cmake-developers] Safe source list GLOBs

2013-05-20 Thread Alexander Neundorf
On Monday 20 May 2013, Wojciech Knapik wrote: > On Wed, May 15, 2013 at 07:26:58PM +0200, Alexander Neundorf wrote: > > On Wednesday 15 May 2013, Bill Hoffman wrote: > > > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > > > >> Glo

Re: [cmake-developers] Safe source list GLOBs

2013-05-19 Thread Wojciech Knapik
On Wed, May 15, 2013 at 07:26:58PM +0200, Alexander Neundorf wrote: > On Wednesday 15 May 2013, Bill Hoffman wrote: > > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > > >> Globs simply do not work well for source files. > > > > >

Re: [cmake-developers] Safe source list GLOBs

2013-05-19 Thread Wojciech Knapik
On Wed, May 15, 2013 at 09:50:34AM -0400, Bill Hoffman wrote: > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > > > >> Globs simply do not work well for source files. > > > > GLOBs work great for source files. Just not with CMake c

Re: [cmake-developers] Safe source list GLOBs

2013-05-15 Thread Alexander Neundorf
On Wednesday 15 May 2013, Bill Hoffman wrote: > On 5/15/2013 4:48 AM, Wojciech Knapik wrote: > > On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > >> Globs simply do not work well for source files. > > > > GLOBs work great for source files. Just not with CMake currently ;] > > No it

Re: [cmake-developers] Safe source list GLOBs

2013-05-15 Thread Bill Hoffman
On 5/15/2013 4:48 AM, Wojciech Knapik wrote: On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: Globs simply do not work well for source files. GLOBs work great for source files. Just not with CMake currently ;] No it does not. It is sloppy IMO. It will pick up junk files.

Re: [cmake-developers] Safe source list GLOBs

2013-05-15 Thread Wojciech Knapik
On Tue, May 14, 2013 at 03:55:37PM -0400, Bill Hoffman wrote: > Globs simply do not work well for source files. GLOBs work great for source files. Just not with CMake currently ;] > I don't think this will be come a module in CMake. > > To have this work in a generic way, you would have to run

Re: [cmake-developers] Safe source list GLOBs

2013-05-14 Thread Bill Hoffman
Sorry for the top post... :) Globs simply do not work well for source files. I don't think this will be come a module in CMake. To have this work in a generic way, you would have to run something that did the glob with each time the build system was run, and be able to change the sources

Re: [cmake-developers] Safe source list GLOBs

2013-05-13 Thread Wojciech Knapik
On Mon, May 13, 2013 at 09:49:03AM -0400, Brad King wrote: > On 05/11/2013 11:09 PM, Wojciech Knapik wrote: > > > I recently ran into the issue of GLOBs being unsafe for source lists and > > wrote a very simple piece of code to fix the problem. A generalized > > version of that code is available h

Re: [cmake-developers] Safe source list GLOBs

2013-05-13 Thread Brad King
On 05/11/2013 11:09 PM, Wojciech Knapik wrote: > I recently ran into the issue of GLOBs being unsafe for source lists and > wrote a very simple piece of code to fix the problem. A generalized > version of that code is available here: > > https://github.com/wknapik/scm/blob/master/code/cmake/Module