Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-03-06 03:08:18


Vladimir Prus wrote:
>On Friday 03 March 2006 21:12, Bojan Resnik wrote:
> > I updated from CVS today, and I found that -Op compiler options have
> > been added to MSVC toolkit. This option is not available in MSVC8.
> > This is what MSDN for VC8 says:
> >
> > ---
> > /Op compiler option had been removed. Use /fp (Specify Floating-Point
> > Behavior) instead.
>
>So, I need to replace "/0p" with what? Just "/fp", or "/fp=whatever" or?

/fp:<except[-]|fast|precise|strict> choose floating-point model:
    except[-] - consider floating-point exceptions when generating code
    fast - "fast" floating-point model; results are less predictable
    precise - "precise" floating-point model; results are predictable
    strict - "strict" floating-point model (implies /fp:except)

I have modified msvc.jam locally and have added support for most of the VC
command-line options (see attachment). Note that this contains several
modifications that I intend on submitting patches for incrementally. The
main logic is:

feature improve-fp-consistency : no yes : propagated ;
feature consider-fp-exceptions : no yes : propagated ;
feature fp-model : default fast precise strict : propagated ;

#...
    if [ MATCH ^([67]\\.) : $(version) ]
    {
        # 8.0 deprecates some of the options
        flags msvc.compile CFLAGS <improve-fp-consistency>yes : /Op ;
    }
    else # VC8+
    {
        flags msvc.compile CFLAGS <consider-fp-exceptions>yes : /fp:except ;
        flags msvc.compile CFLAGS <fp-model>fast : /fp:fast ;
        flags msvc.compile CFLAGS <fp-model>precise : /fp:precise ;
        flags msvc.compile CFLAGS <fp-model>strict : /fp:strict ;
    }

>And is "/fp" avaiable on VC7.1?

No. It's one of the new options in VC8. In the logic above, I have kept them
separate, but it might be better to have:

   <fp-model>precise ==> /Op

for VC6 - 7.1.

- Reece




Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk