[CMake] in- and out-of-source tree builds
Bill Hoffman
bill.hoffman at kitware.com
Wed Mar 14 16:43:52 EST 2007
Orion Poplawski wrote:
> Various projects using cmake state that they don't support in source
> tree builds. Is this a general case for cmake projects?
>
No, it is not a general case. CMake itself can be built either way.
> We're working on packaging guidelines for cmake projects in Fedora.
> Draft is here: http://fedoraproject.org/wiki/PackagingDrafts/cmake.
> Currently this does an in source tree build.
>
> I currently do:
>
> mkdir fedora
> pushd fedora
> cmake ..
>
> In which the build directory is a subdirectory of the source tree.
> I've also seen recommendations for a parallel directory, e.g.:
>
> cmake ../source
>
> Is this preferred over the former?
Both of these cases are considered out-of-source builds. Both should
work equally well. In source would be:
cd source
cmake .
>
> 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.
-Bill
More information about the CMake
mailing list