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

Bill Hoffman bill.hoffman at kitware.com
Tue Mar 3 12:21:57 EST 2009


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