[CMake] Checking MSVC90 or higher?

Robert Dailey rcdailey at gmail.com
Sat Jun 27 14:41:58 EDT 2009


There is a specific compiler flag that I'm telling CMake to use for the MSVC
compiler, however this flag is only supported by MSVC90 and higher. Right
now I'm doing this:
if( MSVC90 )
...
endif()

But how do I check something like this:

if( MSVC_VERSION GREATER 9 OR MSVC_VERSION EQUAL 9 )
...
endif()

I realize MSVC_VERSION doesn't exist, but this is mainly pseudocode to show
you what I'm looking for. Help is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090627/ddf183bf/attachment.htm>


More information about the CMake mailing list