[CMake] MSVC_VERSION for VC11?

Robert Dailey rcdailey at gmail.com
Tue Mar 6 12:50:19 EST 2012


I actually need to check the compiler version for ABI compatibility
reasons. I download my third party libraries via CMake script and I check
the current compiler version so I know which DLLs to download :P

Unfortunately C++ name mangling is not standardized so this is necessary.

Also it is quite possible to have the pimpl pattern in my code base,
designed in such a way that different CPP files are included in my targets
depending on compiler version. It's a way to abstract away
platform-specific and compiler-specific implementation details (Perhaps I
use MSVC-specific extensions in my pimpl class, or maybe I do some inline
assembler to overcome a specific optimization failure or inefficiency in
older versions of MSVC).

Need more examples? :P

---------
Robert Dailey


On Mon, Mar 5, 2012 at 3:25 PM, Eric Noulard <eric.noulard at gmail.com> wrote:

> 2012/3/5 Robert Dailey <rcdailey at gmail.com>:
> > The docs aren't updated to reflect this so I just wanted to make sure.
>
> Patch for documentation may be accepted as well :-]
>
> > I didn't have time to run through the source code (you Linux people and
> your
> > fancy 'git grep' commands :P )
>
> You Windows people and your need to check compiler version before trying
> to compile a portable piece of code :P !!
>
>
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120306/b322b1eb/attachment.htm>


More information about the CMake mailing list