Wireshark-dev: Re: [Wireshark-dev] cmake giving options the compiler does not understand
From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Fri, 3 Jan 2014 01:21:04 +0100
On Thu, Jan 02, 2014 at 03:16:17PM -0800, Guy Harris wrote:
> 
> On Jan 2, 2014, at 2:44 PM, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> wrote:
> 
> > Cmake has that function which I listed that is supposed to do it for us but it doesn't seem to work (at least for me or at least not all the time).
> 
> Given that at least two people have said that blowing away the build directory sometimes fixes the problem, perhaps something's being cached?

Yes, that's the case. Just create an empty build dir, run cmake, then run cmake
again. The second run will be much faster and the output much shorter. Basically
everything that is about (positive) detection of build environment stuff is
(permanently) cached. You will either need to unset that variable (e.g. with ccmake)
or remove the CMakeCache.txt file.

> But, if that's the case, was it cached when a compiler that *does* support -Wshorten-64-to-32 was used, and then a *different* compiler was used?  (Building in a directory stored on a file server can make this more likely to happen, as you might be building on machine A and then re-building on machine B without clearing out all the stuff left around by the configure-and-build on machine A.)

I will change the cmake tests to run separately for c and c++ - if I read the
commits correctly you did this for autotools already. I (and thus the code)
currently assume that the c and c++ compiler are from the same "source".

Ciao
     Jörg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.