[Insight-developers] Preventing In-Source Builds
Bill Lorensen
bill.lorensen at gmail.com
Sat Oct 16 12:06:05 EDT 2010
The error tells you explicitly what to do.
# ITK should not be configured & built in the ITK source directory
# You must run cmake in a build directory.
# For example:
# mkdir ITK-Sandbox ; cd ITK-sandbox
# git clone git://itk.org/ITK.git # or download & unpack the source tarball
# mkdir ITK-build ; cd ITK-build ; ccmake ../ITK
# NOTE: CMake will have created several files & directories
# in your source tree. run 'git status' to find them and
# remove them.
On Sat, Oct 16, 2010 at 11:28 AM, David Doria <daviddoria at gmail.com> wrote:
> 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