[Insight-developers] Preventing In-Source Builds

David Doria daviddoria at gmail.com
Sat Oct 16 11:28:56 EDT 2010


On Sat, Oct 16, 2010 at 11:17 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Folks,
>
> Kent Williams has created ITK cmake modifications to block in-source
> builds. As you know, doing cmake in the source tree pollutes the
> source tree with cmake, build and configured .h files. The only way to
> recover is to blow away the source tree and recreate it.
>
> New users often do this and have trouble recovering.
>
> I tried Kent's solution and it works great.
>
> Is there any reason why one would want to have an in source build?
>
> I propose that we push Kent's changes to save our users headaches in the future.
>
> Bill

What is the error produced when a user runs

cmake .

from the source directory?

What happens if the user runs ccmake . from the source directory? Is
the error presented when you press 'c' for configure? Is there a way
to stop them before that? (If you spend a few minutes setting up
options and then realize you can't do this, that may be annoying.)

The error should definitely detail how you SHOULD do it, not just say
something like "error: in source builds not allowed". This is not as
useful to a new user as something more along the lines of "Error: you
have tried to build ITK in the same directory as the source code. This
is called an "in source build" and is strongly not recommended. Please
create a 'bin' directory outside of the ITK source directory and
re-run cmake from that directory with 'cmake .../yourITKsource"

Thoughts?

David


More information about the Insight-developers mailing list