[cmake-developers] compiler version variables

Brad King brad.king at kitware.com
Fri Feb 24 13:02:18 EST 2012


On 2/24/2012 11:50 AM, Rolf Eike Beer wrote:
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c28e2769482c12da53a3c01ea45f9ae6cdc1de34
> commit c28e2769482c12da53a3c01ea45f9ae6cdc1de34
> Author:     Rolf Eike Beer<eike at sf-mail.de>
> AuthorDate: Fri Feb 24 17:48:02 2012 +0100
> Commit:     Rolf Eike Beer<eike at sf-mail.de>
> CommitDate: Fri Feb 24 17:48:02 2012 +0100
>
>      GenerateExportHeader: improve compiler identification
>
>      Use CMAKE_<LANG>_COMPILER_VERSION instead of calling the compiler. This macro
>      predates those useful variables. This also fixes the issue that g++ version
>      detection was not working if C language was not enabled.

FYI, this variable is not set by all generators yet.  It is computed as
part of the compiler identification step, but that doesn't happen for
VS and Xcode.  For the other generators the compiler version will need
to be detected as part of the ABI determination which always runs.  I
haven't had time yet to add that, so currently the documentation for the
variables just says that they are for internal use.  Note that this is
also the case for CMAKE_<LANG>_COMPILER_ID.

-Brad



More information about the cmake-developers mailing list