[Insight-developers] In-source build : gdcm

kent williams norman-k-williams at uiowa.edu
Thu Oct 14 12:04:00 EDT 2010


As was just discussed on the CMake ML starting here:

http://www.mail-archive.com/cmake@cmake.org/msg31972.html

You can compare CMAKE_CURRENT_SOURCE_DIR with CMAKE_CURRENT_BINARY_DIR and
throw an error.  At that point in the CMake process, it looks like the only
thing CMake has dropped in the source directory is CMakeCache.txt and
CMakefiles.

In this message Aaron Meadows has a CMake function that detects the
in-source build and deletes the CMake droppings before exiting with an error
message:

http://www.mail-archive.com/cmake@cmake.org/msg32049.html

On 10/14/10 10:42 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:

> Maybe we should block in-source builds for ITK. When are they ever
> recommended?
> 
> New users often make the mistake that is, as Kent pointed, a pain to
> recover from if you are a newbie.
> 
> 
> On Thu, Oct 14, 2010 at 11:32 AM, David Cole <david.cole at kitware.com> wrote:
>> Everyone who has ever accidentally done an in-source build has noticed this.
>> It's the main reason why I so strongly discourage ever building in-source.
>> 
>> It's fine as long as you don't have any locally modified source files, but
>> if you do, then it's a real pain to recover from.
>> 
>> I just hate hearing about premature greying. No fun.
>> Avoid premature greying: do out-of-source builds!
>> 
>> :-)
>> David C.
>> 
>> On Thu, Oct 14, 2010 at 10:25 AM, kent williams
>> <norman-k-williams at uiowa.edu> wrote:
>>> 
>>> I don¹t know if anyone else has noticed this, but this CMake quirk has
>>> caused premature greying amongst some of our RAs:
>>> 
>>> If you accidentally configure for an In-source build, and then try and use
>>> the same source tree for an out-of-source build, it will appear to configure
>>> correctly, but the out of source build tree is un-buildable.  CMake still
>>> wants you to build in-source.
>>> 
>>> You have to either kill your source tree and check it out again, or
>>> manually remove all the ŒCMake droppings¹ in your source tree, which are
>>> considerable in number, and rather obscure if you¹re not a grizzled CMake
>>> veteran.
>>> 
>>> 
>>> On 10/13/10 4:54 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>>> 
>>> 
>>> Hi Mathieu,
>>> 
>>> CPack supports in-source builds.
>>> 
>>> The warning is probably unnecessary.
>>> 
>>> 
>>> However, we have to setup a Nightly
>>> build that tests the Installation of ITK.
>>> (that's in my plate...)
>>> 
>>> 
>>>     Luis
>>> 
>>> 
>>> -----------------------------------------------------------
>>> On Mon, Oct 11, 2010 at 8:06 AM, Mathieu Malaterre
>>> <mathieu.malaterre at gmail.com> wrote:
>>> 
>>> On Mon, Oct 11, 2010 at 2:06 AM, Luis Ibanez <luis.ibanez at kitware.com>
>>> wrote:
>>>> 
>>>> Hi Mathieu,
>>>> 
>>>> I know that we encourage users to do out-of-source builds,
>>>> but was not aware that we are now precluding users from
>>>> making in-source builds:
>>>> 
>>>>> cd ITK
>>>>> cmake .
>>>> 
>>>> 
>>>> Make Error at Utilities/gdcm/CMakeLists.txt:34 (MESSAGE):
>>>>   GDCM requires an out of source Build.  Please create a separate binary
>>>>   directory and run CMake there.
>>>> 
>>>> 
>>>> -- Configuring incomplete, errors occurred!
>>>> 
>>>> 
>>>> -----------------------
>>>> 
>>>> 
>>>> Is there a deep technical reason for this change ?
>>> 
>>> CPack does not support in-source built AFAIK. I'll change the error to
>>> a warning.
>>> 
>>> Thanks for the report.
>>> --
>>> Mathieu
>>> 
>>> 
>>> ________________________________
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.html
>>> 
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>> 
>>> _______________________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://kitware.com/products/protraining.html
>>> 
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>> 
>> 
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Kitware offers ITK Training Courses, for more information visit:
>> http://kitware.com/products/protraining.html
>> 
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers
>> 
>> 



More information about the Insight-developers mailing list