Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] rev 50749: /trunk/ /trunk/: CMakeLists.txt

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Tue, 23 Jul 2013 23:56:52 +0200
On Tue, Jul 23, 2013 at 12:09:13PM -0700, Guy Harris wrote:
> What criteria does CMake use to set CMAKE_C_COMPILER_ID?  Hopefully it's capable of setting it to "Clang" if the compiler is Clang, even if the path to the compiler happens to have "cc" or even "gcc" as the last component of the path name.

>From the cmake sources (Modules/CMakeCCompilerId.c.in):

...
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)

#elif
...

So this is the reliable detection method.

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.