[CMake] Automatically listing source files with GLOB (Re: How to make FILE() append to the list of files?)

David.Karr at L-3COM.COM David.Karr at L-3COM.COM
Mon Dec 1 14:28:37 EST 2008


>When the decision to change the build system for whatever reason,
>just tell your developers to not complain about it. Tell them to live
>with it _POINT_.

The "point" is, not everyone who is in a position to introduce a 
useful tool into a project is in a position to do it in that way.
Sometimes it has to be "sold" to other people rather than dictated.

>> Besides the project developers themselves, I also had users who
needed 
>> to be able just to build the project without doing any development on

>> it.  I actually got in trouble with those users on account of the one

>> directory where I had listed the source files individually instead of

>> "globbing" them.  The problem was solved when we "globbed" that 
>> directory too.
>
>They change nothing on the project? Why would the source file
>listings be a problem for them, then?

I forget the exact sequence of events, but as I recall, the
inconsistency was introduced somehow during one of the steps between
the actual developer's build and when the source code (including
CMakeLists.txt) ended up on a certain source code control branch.  
All these other users did was to check out all source code on that
branch and attempt to build it.  Presumably a similar outcome could
have occurred via a different chain of events with DSP files that were
maintained directly through Visual Studio, but that argument didn't
impress people who chose to blame the problem on the fact that we used
CMake.

What I think is really remarkable is that despite all the many
implicit requirements of the environment within which this particular
build system had to operate--of which I've barely been able to mention
a small part--CMake was able to adapt to work within them, even when
those requirements didn't match anybody's idea of the best environment
within which to use a tool like CMake.  This says something about the 
power of the tool.

David Karr



More information about the CMake mailing list