[CMake] libraryname decoration

Michael Wild themiwi at gmail.com
Fri Jul 30 09:08:31 EDT 2010


On 30. Jul, 2010, at 14:46 , Olaf van der Spek wrote:

> On Fri, Jul 30, 2010 at 2:42 PM, Michael Wild <themiwi at gmail.com> wrote:
>> Oh, it IS library specific. Where do you think all these BOOST_MSVC and what not come from? It is very specific to Boost. No other project will be able to use this without heavy reworking.
> 
> That's just the MSVC version, available as _MSC_VER by default.

Oh bugger, you really are immune to reason...

1. This is not the only macro.
2. A library project wanting to distribute a similar file has to do a lot of work to adapt it to its own requirements.
3. It is a maintenance nightmare, because e.g. _MSC_VER is combined from the major and minor version number of the compiler, so for VS 2010 it is 1600. This requires that for every new version you'll be adding a new branch in the #if ... #elif ... #endif maze, translating that number into a readable name. Now, imagine other compilers starting to adopt this "magic", this file would just explode (and compilation would probably slow down to a crawl).

> 
>>>> For every new version of MSVC, Xcode etc. you have to update the file. Usually you will be lagging behind, and your users even more so. And then they will complain. To you.
> 
> Only if you include the toolset in the name.

This is really wearing my patience right now. I suggest we stop this absolutely futile discussion and let Olaf come up with something constructive for once (such as a patch). At least I will.

Michael


More information about the CMake mailing list