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

> On Fri, Jul 30, 2010 at 2:25 PM, Michael Wild <them...@gmail.com> wrote:
>> Create a module and share it among your projects, possibly with others. If 
>> it's any good it might get included in CMake.
> 
> I probably will.
> 
>>>>> On Windows, at least build type, run-time and platform.
>>>>> But what should and what should not be part of the name doesn't have
>>>>> to be fixed. So that's no problem.
>>>> 
>>>> Please do explain. How would this work? What would the API be?
>>> 
>>> I don't know yet.
>> 
>> So, how is it no problem then?
> 
> Because I'm quite sure it can be solved.

*sigh*.

> 
>>>> Why? (See how annoying this is? Normally I expect this kind of 
>>>> argumentation/questioning from 4-5 year olds...)
>>> 
>>> Because I don't have to specify the libs to link against myself.
>> 
>> Yes, you do. Because most people library authors will just refuse to write 
>> and maintain an auto_link.hpp
> 
> The auto_link you quoted is not library-specific. But it seems you
> understand why code duplication is bad.
> So there's no need to maintain such an auto_link file.

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.

> 
>> 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.
> 
> See above.

See below (that doesn't need more explanation...)

//
// select toolset if not defined already:
//
#ifndef BOOST_LIB_TOOLSET
// Note: no compilers before 1200 are supported
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)

#  ifdef UNDER_CE
     // vc6:
#    define BOOST_LIB_TOOLSET "evc4"
#  else
     // vc6:
#    define BOOST_LIB_TOOLSET "vc6"
#  endif

#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)

   // vc7:
#  define BOOST_LIB_TOOLSET "vc7"

#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)

   // vc71:
#  define BOOST_LIB_TOOLSET "vc71"

#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)

   // vc80:
#  define BOOST_LIB_TOOLSET "vc80"

#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)

   // vc90:
#  define BOOST_LIB_TOOLSET "vc90"

#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)

   // vc10:
#  define BOOST_LIB_TOOLSET "vc100"

#elif defined(__BORLANDC__)

   // CBuilder 6:
#  define BOOST_LIB_TOOLSET "bcb"

#elif defined(__ICL)

   // Intel C++, no version number:
#  define BOOST_LIB_TOOLSET "iw"

#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )

   // Metrowerks CodeWarrior 8.x
#  define BOOST_LIB_TOOLSET "cw8"

#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )

   // Metrowerks CodeWarrior 9.x
#  define BOOST_LIB_TOOLSET "cw9"

#endif
#endif // BOOST_LIB_TOOLSET


Michael

_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

Reply via email to