[CMake] Detecting compiler version

Filipe Sousa filipe at ipb.pt
Mon Dec 5 11:19:28 EST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Is there any cmake variable with the compiler version used by cmake?.
 I'm using cmake with visual studio 8 but unfortunately Microsoft
deprecated some functions (strdup, strncpy,...) and now I get a lot of
warnings:

warning C4996: 'strncpy' was declared deprecated

I want to disable these warnings with

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd 4996")

How do I know if I'm using vs8 or nmake from vs8 and not something else?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDlGiQbQdNYqwwwCwRAi+9AJ9jOYjv7Co72u467lu4UJJcUNQWJgCfeh/t
YQXCAi8uxYZ/94iIR6bx/Ck=
=Bvh/
-----END PGP SIGNATURE-----


More information about the CMake mailing list