[cmake-developers] Suspicious Clang versions

Sean McBride sean at rogue-research.com
Mon Aug 5 11:33:52 EDT 2013


On Mon, 5 Aug 2013 09:44:00 -0400, Brad King said:

>and local testing we can use __APPLE_CC__ to detect Apple compiler
>builds.

In my own build of open source clang from svn trunk, it seems that __APPLE_CC__ is defined:

$ clang -dM -E - < /dev/null

#define __APPLE_CC__ 5621

So I don't think that will help.

>We could consider treating this as a separate compiler and using
>a new compiler id like ClangApple or AppleClang or something.

That's probably a good idea...

Embarcadero's compiler is also based on clang, how do you deal with it?

I guess if the output of 'clang --version' includes the string 'Apple', it's "AppleClang" and not "clang".

But I think it may be a good idea to ask on cfe-dev or xcode-users mailing lists too...

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the cmake-developers mailing list