|
Boost : |
From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-09-04 08:58:42
I suspect (but have not got enough Hungarian language skills and MS Internals to
get it to work)
that a solution is to switch on the LanguageExtensions using two functions:
HRESULT __stdcall get_DisableLanguageExtensions(
/* [out, retval] */ VARIANT_BOOL* retVal
);
HRESULT __stdcall put_DisableLanguageExtensions(
/* [in] */ VARIANT_BOOL NewValue
);
Ones seems to get into a Catch-22 in that these can only work if
LanguageExtensions are already enabled! Can any Windows Gurus can advise?
However I also find that linking with a test_tools static library is not too
inconvenient. It can be built non-strict, but the actual test modules can be
compiled fully strict, though they produce some warnings which look ignorable
and/or fixable. Probably Gennadiy can find some more fun activities than fixing
them ;-)
So I think this is acceptable unless a better solution can be found easily.
Only execution_monitor.cpp seems to require MS language extensions (because it
calls winnt.h etc).
Paul
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Beman Dawes
| Sent: Thursday, September 04, 2003 1:40 AM
| To: Boost mailing list; Boost
| Subject: Re: [boost] BOOST TEST and strict /Za no lanugage extensions
| option - virturenot fully rewarded?
|
|
| At 09:56 AM 9/3/2003, Paul A. Bristow wrote:
|
| >In trying to be virtuous and test everything compiled in strict mode as I
|
| >write it, I am finding myself thwarted by BOOST minimal_test otherwise
| >excellent test system.
| >
| >I aim to compile and test all my code with MSVC 7.1 in strict mode
| (option
| >/Za -
| >no language extensions and warning level 4).
| >
| >But in practice this is impossible using the minimal_test.cpp
| >because #include also compiles Windows specific structured exception
| >handling modules like winNT.h and these require MS extensions to
| >compile - otherwise zillions of errors.
| >
| >It is possible to avoid this by compiling these modules separately with
| >extensions enabled, building a library, then to compile MY
| modules >strictly, and then linking to the library, but this is a bit more
| >cumbersome than minimal_testing.
| >
| >This problem will also apply to all testing of Boost library items using
| >the minimal test if we try to raise the code quality bar to 'strict'
| >compilation.
| >
| >Is there any easier way round this so that minimal_test can be used
| without
| >linking with a library?
|
| If Gennadiy can somehow make boost/test/minimal.hpp (and dependencies) work
| /Za, that's great. But he is already providing a full object-library based
| solution, as well as the header implemented solution. Not to mention three
| separate levels of functionality (execution tools, test tools, full unit
| test). I'd hate to see added complexity to solve a problem that can already
| be dealt with just by using the object-library version of the tools.
| Minimal test was designed to be just that - minimal. It isn't expected to
| be useful in as wide a range of uses as the library as a whole.
|
| Just my 2 cents...
|
| --Beman
|
| _______________________________________________
| Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk