[CMake] check_cxx_compiler_flag() doesn't work with cl.exe/rc.exe

Alexander Neundorf a.neundorf-work at gmx.net
Mon Aug 27 13:36:25 EDT 2007


On Monday 27 August 2007 13:29, Dizzy wrote:
> Hello
>
> I use check_cxx_compiler_flag(-ansi -pedantic) to try to use these flags
> where they are valid. However when using nmake makefiles generator cmake
> doesn't seem to detect that cl.exe doesn't need them (I noticed cl.exe
> doesn't error but warns on using those flags but this still means the
> compiler doesn't support them, not to mention it creates tons of redundant
> warnings about those flags).

This test only checks whether the compiler fails with an error if used with 
the given flag. 
I think for setting compiler flags it is ok to have separate sections for gcc 
and msvc.

Bye
Alex


More information about the CMake mailing list