On 09/12/2012 02:33 PM, Rolf Eike Beer wrote: > Ah, hm. Ok, this is the compiler version variable that I knew it would exist > but did not know how it was named. So this demonstrates exactly what I was > talking about: > > if (MSVC_VERSION VERSION_GREATER 1400) > > Without looking in the docs, which MSVC version am I talking about?
Always subtract 6 from the "cl" version number to get the IDE version. This is just a standard VS thing and is not CMake-specific. > I would > propose to name it MSVC_IDE_VERSION then, so this would make it clear to > everyone: > > if (MSVC_IDE_VERSION VERSION_GREATER 8.0) Starting with VS 2010 the projects support specifying the toolchain from a different version of VS. Now that ide-compiler-id is done we can possibly add support for selecting the compiler in the future. Therefore the IDE version can be associated only with the IDE generators, and we already have that from the generator name in CMAKE_GENERATOR. > And from all what I know the CMAKE_CXX_COMPILER_VERSION variable would also > return 1400 in that case. It would be 14.0.$build or so. It's the "cl" tool version. > (Another variable missing on the Wiki) The Wiki pre-dates the variables section of the reference documentation. Is it really needed anymore? Now it just duplicates information. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers