Boost logo

Boost :

Subject: [boost] Jamfile to control MSVC compiler options /Za and /Ze
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2009-11-10 09:57:04


I have been taking my own medicine and trying to get Boost.math free of warnings
with the /Za No MS extensions option.

Mostly this is fine.

project
    : requirements
      <toolset>msvc:<cxxflags>/Za # disable MS Extensions in Boost.Test.
...

But a few tests *require* the extensions.

I have tried to enable them for just one module thus:

# pow test requires type_of that MS extensions.
run pow_test.cpp ../../test/build//boost_test_exec_monitor
        : # command line
        : # input files
        : # requirements
          <toolset>msvc:<cxxflags>/Ze # Requires type_of which requires MS
extensions.
        : test_pow
;

but the compiler complains about deprecation (and most importantly, that later
options do not override, so you can't specify /Za and them /Ze.

compile-c-c++
..\..\..\bin.v2\libs\math\test\test_pow.test\msvc-9.0\debug\asynch-exceptions-on
\threading-multi\pow_test.obj

cl : Command line warning D9035 : option 'Ze' has been deprecated and will be
removed in a future release

cl : Command line error D8016 : '/Za' and '/Ze' command-line options are
incompatible

Can any jam experts suggest a way round this (short of leaving the default
enable extensions, and making an exception for all the vast majority of modules
that are OK with /Za - too tedious to be attractive? Splitting into two classes
of tests is also ugly.)

Thanks.

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204
pbristow_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk