[CMake] Getting the compiler version?

Bartlett, Roscoe A rabartl at sandia.gov
Tue Apr 14 11:17:02 EDT 2009


Mike,

Thanks for the pointer.  We will look into this and try to create a module that other people could use also.  However, it would be good if we could get this added as an official CMake module that can be supported by a broader community.

Thanks,

- Ross
 

> -----Original Message-----
> From: Mike Jackson [mailto:mike.jackson at bluequartz.net] 
> Sent: Tuesday, April 14, 2009 8:28 AM
> To: Bartlett, Roscoe A
> Cc: cmake at cmake.org; Perschbacher, Brent M
> Subject: Re: [CMake] Getting the compiler version?
> 
> 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