[CMake] Getting the compiler version?

Mike Jackson mike.jackson at bluequartz.net
Tue Apr 14 10:27:49 EDT 2009


Not really a "portable" way but there are usually compiler specific
ways which then get wrapped in lots of "if()" commands based on what
is being used.

If you look through the FindBoost.cmake file that comes with CMake
around line 535 you may be able to pull out that code which does a
pretty decent job of determining compiler versions.

Mike Jackson

On Tue, Apr 14, 2009 at 10:04 AM, Bartlett, Roscoe A <rabartl at sandia.gov> wrote:
> Hello,
>
> Is there some way portable to get the compiler version in CMake so that I
> can print it out in the configure output?  This is important for our
> portability testing system based on Cmake/Ctest/Cdash.
>
> Thanks,
>
> - Ross
>


More information about the CMake mailing list