Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-28 08:17:30

Bojan Resnik wrote:
>2005/9/28, Alexey Pakhunov <alexeypa_at_[hidden]>:
> > try this:
> >
> > using msvc : 6.0 ;
> > using msvc : 7.1 ;
> This indeed did the trick. When I put 6.0 instead of 6, it found the
>compiler, and without /wp64 and /wd4675 it compiled everything just
> Perhaps the /Zc:forScope and especially /Zc:wchar_t should be
>optional and controlled via additional features. /Zc:wchar_t option is
>incompatible with third-party libraries that are compiled without it,
>and it should be possible to disable it for certain projects.

/Zc:forScope does not alter binary compatibility, but as you say /Zc:wchar_t
does. This will only be relevant for libraries compiled outside the BBv2
build system (e.g. a prebuilt CppUnit or STLPort) that has /Zc:wchar_t

I have proposed a character set option, which I originally posted as one
value, but split into two after some feedback. I am now convinced that this
should be a single option:

# builtin.jam

feature character-set : narrow wide multibyte : composite propagated ;
feature.compose <character-set>wide : <define>UNICODE <define>_UNICODE ;
feature.compose <character-set>multibyte : <define>_MBCS ;

This resolves standard library (tchar.h) and Win32 API conflicts for
defining either of the [_]UNICODE macros, but not the other.

/Zc:wchar_t is an independant MS-specific feature that should be independant
of <character-set> (since you could have code that uses wchar_t independant
of the character set being used). I therefore propose that the feature (if
accepted) is added to msvc.jam and defaults to on:

# msvc.jam

feature native-wide-character : on off : propagated ;
if MSVC 7.0 and above
flags CFLAGS <native-wide-character>on : /Zc:wchar_t <toolset>msvc ;


* MSVC 8 enables /Zc:wchar_t by default.

I would prefer to not have this feature, but what about (as Bojan mentions)
the case where you use dependant (pre-built) libraries that were compiled
without this option.

- Reece


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at