[cmake-developers] Suspicious Clang versions
Brad King
brad.king at kitware.com
Mon Aug 5 15:45:15 EDT 2013
On 08/05/2013 03:28 PM, Brad King wrote:
> I also see __apple_build_version__ in that output. Searching
> for it finds that it is used for this purpose in Qt:
>
> https://qt.gitorious.org/qt/qtbase/commit/26c7bb25
>
> but seems to be undocumented in general. Will that work?
>
>> Embarcadero's compiler is also based on clang, how do you deal with it?
>
> We don't support Clang-based Embarcadero compilers yet AFAIK.
> However, this demonstrates that we will need a compiler id for
> each vendor that distributes a modified Clang. With a separate
> compiler id then version comparisons can become meaningful again.
One of the main purposes of the compiler <id> is to load platform
modules like "Platform/<os>-<id>-<lang>" and "Compiler/<id>-<lang>".
Most of the information in these files will be identical across
the upstream and vendor-specific Clang distributions so having a
separate compiler id may lead to confusion and duplication.
Another approach is to introduce a CMAKE_<LANG>_COMPILER_VENDOR
variable to name the vendor (or _VARIANT?). This would allow code
that needs to know the difference to detect it but otherwise stay
out of the way. Then the order of most granular to least granular
compiler identification would be ID > VENDOR > VERSION. What would
we do with compilers where the ID implies the VENDOR, though?
Comments?
-Brad
More information about the cmake-developers
mailing list