Wireshark mailing list archives

Re: cmake giving options the compiler does not understand


From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Wed, 08 Jan 2014 10:04:10 -0500

On 01/05/14 14:40, Guy Harris wrote:

On Jan 5, 2014, at 10:00 AM, Jeff Morriss <jeff.morriss.ws () gmail com> wrote:

On 01/04/2014 09:51 PM, Guy Harris wrote:

On Jan 4, 2014, at 9:17 AM, Jeff Morriss <jeff.morriss.ws () gmail com> wrote:


6) make # just to show that it works (I stopped the build after a few C files were compiled)
7) vi ../CMakeLists.txt
8) Put "-Wshorten-64-to-32" back where it was (at the end of WIRESHARK_C_ONLY_FLAGS)
9) cmake ..

Presumably CMake then reports something such as

        -- Checking for flag: -Wshorten-64-to-32
        -- Performing Test WS_C_FLAG_VALID44
        -- Performing Test WS_C_FLAG_VALID44 - Success

in that case, meaning it thinks -Wshorten-64-to-32 *is* supported by the C compiler?

Well it doesn't do the full check on this (cached) pass, it just says:

-- Checking for flag: -Wjump-misses-init
-- Checking for flag: -Wshorten-64-to-32
-- C-Flags:  -Wall -W -Wextra -Wendif-labels [...]

So is the issue that the tests have the ordinal number of the flag, rather than the name of the flag, in the name of the 
test, with that name being used when caching results, so that the cache is bogus if you've reordered the flags since 
the cached results are generated?

Either that or it was caching the variable name.

(Presumably this also caused some flag that *does* work *not* to be added, as the results of the test of 
-Wshorten-64-to-32 were used on that flag.)

That is my presumption as well.

Regardless, it appears Joerg has fixed it in r54638. :-)

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: