[CMake] GCC version variable

dizzy dizzy at roedu.net
Thu Jun 19 08:26:53 EDT 2008


On Wednesday 18 June 2008 23:48:03 Emmanuel Blot wrote:
> Is there some CMake macro to report the version of the GCC compiler
> version?
> It seems these macros exist for the CL compiler, but I've not found
> the matching macros for GCC.
>
> Some warnings are produced w/ GCC 4, but the matching warning shut-off
> option only exists for GCC 4 (not for GCC3).

So then check if the compiler supports the option directly instead of assuming 
a relation between version and option which relation may be wrong.

To do that, you could use CheckC[XX]CompilerFlag module and command.

-- 
Mihai RUSU					Email: dizzy at roedu.net
			"Linux is obsolete" -- AST


More information about the CMake mailing list