[CMake] ccmake gets all squirrelly over which C++ compiler to use.

kent williams nkwmailinglists at gmail.com
Thu Mar 5 10:17:51 EST 2009


So the problem with CCMake forgetting valid user input stems from the
entire CMakeCache.txt file getting deleted if there's a compiler
mismatch?


On Tue, Mar 3, 2009 at 11:21 AM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> Mathieu Malaterre wrote:
>>
>> On Tue, Mar 3, 2009 at 4:20 PM, kent williams <nkwmailinglists at gmail.com>
>> wrote:
>>>
>>> Lather, Rinse, Repeat. After 2 or 3 go-arounds, CCMake is happy and
>>> lets you generate your build files.
>>>
>>> And if I recall correctly, earlier versions (2.3? 2.4?) did not act this
>>> way.
>>
>> Yup, this behavior appears exactly when 2.6.0 was released.
>> Because this can be reproduce only by manual process, it may have gone
>> unnoticed in the cmake regression testing...
>>
> OK, so to address changing a compiler from ccmake, a very common complaint
> on the list.  I put something in that would detect a change in compilers
> from the ccmake application.  If one is detected, the cache is removed
> allowing for the new compiler to be used.  Unfortunately, this conflicted
> with some overly paranoid stuff in the VTK/ITK CMakeLists.txt files that
> forces a compiler change.   In hind site that was a bad idea, and there is
> already a way to disable it.
>
> http://public.kitware.com/Bug/view.php?id=7745
>
> So, if you run cmake -DCMAKE_OVERRIDE_COMPILER_MISMATCH=TRUE, or add that
> variable to your cache, then the problem will go away...
>
> -Bill
>
>


More information about the CMake mailing list