[CMake] Updating files in the source tree.

Bill Hoffman bill.hoffman at kitware.com
Tue Jul 1 15:59:28 EDT 2014


On 7/1/2014 3:37 PM, Rick McGuire wrote:
>         The big question comes down to "should I?".  Is doing this somehow a
>         violation of CMake rules/conventions?  Are there any issues I
>         need to
>         consider?  And, the ultimate question is whether it is somehow
>         possible
>         to set up dependencies where I could get back to the original build
>         behavior?  Although I would be perfectly fine just having a
>         target that
>         allowed updating those files on demand.
>
>     So, yeah it is a bad idea to put files in the source tree from the
>     build.  This will preclude multiple out of source build trees from
>     one source checkout.  I like to think that the source tree is on a
>     read only file system.
>
>
> There's really no problem with that, unless the developer is doing
> something silly like trying to do simultaneous builds...and there are
> other reasons that would preclude trying to do that.
>
It all depends on what is going into the source tree.   Maybe not in 
your specific case, but in general it is a bad idea to put files into 
the source tree.  The main reason is that it prevents clean out of 
source builds.

-Bill



More information about the CMake mailing list