On Jul 21, 2013, at 7:06 PM, Joerg Mayer <jmayer@xxxxxxxxx> wrote:
> Hello Michael,
>
> On Sun, Jul 21, 2013 at 06:45:11PM +0200, Michael Tuexen wrote:
>> [mba:wireshark/trunk/build] tuexen% clang --version
>> Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
>> Target: x86_64-apple-darwin12.4.0
>
> On my system:
> Lilly:svn jmayer$ clang --version
> Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
> Target: x86_64-apple-darwin10
>
>> -- Performing Test WS_C_FLAG_VALID0
>> -- Performing Test WS_C_FLAG_VALID0 - Success
> ...
>> -- Performing Test WS_C_FLAG_VALID25 - Success
>> -- C-Flags: -O2 -g -Wall -W -Wextra -Wendif-labels -Wpointer-arith -Warray-bounds -Wformat-security -Wshorten-64-to-32 -Wvla -Waddress -Warray-bounds -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wno-overlength-strings -Wwrite-strings -Wno-long-long -Wc++-compat -Wdeclaration-after-statement -Wshadow -Wno-pointer-sign -Wold-style-definition -Wshadow -Wstrict-prototypes
>> CXX-Flags: -O2 -g -Wall -W -Wextra -Wendif-labels -Wpointer-arith -Warray-bounds -Wformat-security -Wshorten-64-to-32 -Wvla -Waddress -Warray-bounds -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wno-overlength-strings -Wwrite-strings -Wno-long-long
>
> This matches with Guy's analysis although it doesn't show that behaviour on my
> system (which is too old no doubt). I will add code to detect that flag and if it
> works with gcc and older clang, then I will commit it and hope it will fix the
> detection problem on systems with newer clang.
>
>> /* _U_ isn't needed for C++, simply don't name the variable.
>> However, we do need it for some headers that are shared between C and C++. */
>> #define _U_
>
>> So: It doesn't work. Is there a way I can print the value of CMAKE_C_COMPILER?
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt (revision 50757)
> +++ CMakeLists.txt (working copy)
> @@ -189,6 +189,8 @@
> -DG_DISABLE_SINGLE_INCLUDES
> )
>
> +message(STATUS "C-Compiler: ${CMAKE_C_COMPILER}")
> +
> # Counterhack to work around some cache magic in CHECK_C_SOURCE_COMPILES
> include(CheckCCompilerFlag)
> set(C 0)
It reports:
C-Compiler: /usr/bin/cc
That explains why it doesn't detect it as clang...
>
> Thanks for testing
.. not only testing. I'm using it. And it is bad to have all the
unused warnings, since then I don't detect bugs I would commit...
Thanks a lot for the cmake support. I really use it since Apple
doesn't install autotools anymore.
Best regards
Michael
> 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.
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives: http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe