[CMake] in- and out-of-source tree builds

Brandon J. Van Every bvanevery at gmail.com
Wed Mar 14 17:12:51 EST 2007


Bill Hoffman wrote:
> Orion Poplawski wrote:
>
>
>>
>> What are the issues that arise?  In general with RPM packaging you 
>> are starting with a clean freshly unpacked source tree.
> It really depends on the project.  There are no cmake imposed 
> limitations on this.

What happens in practice, is if someone's project is oriented towards 
in-source builds, they make mistakes in how to support out-of-source 
builds.  They don't test the out-of-source case enough and it breaks.  
Hopefully it breaks in obvious ways, but it's possible to break in 
obscure, painful ways, depending on what the project mishandles.

If someone's project is oriented towards out-of-source builds, it is 
theoretically possible that they could mess up in-source builds in some 
corner case.  Again, due to lack of testing of that case.  But in 
practice, if you're handling out-of-source correctly, then in-source is 
almost certain to work.

For this reason I recommend that all CMake developers orient themselves 
to out-of-source builds.


Cheers,
Brandon Van Every



More information about the CMake mailing list