Boost logo

Boost-Build :

Subject: [Boost-build] Grepping for error messages
From: Tom Westerhout (kot.tom97_at_[hidden])
Date: 2017-10-14 16:53:32


Greetings!

Boost.Build has functionality to detect that compilation fails. I wonder
if there's a way to catch compiler output in this case and grep for a
particular expression?

For example, I have something like

    alias "drop_view" :
        [ run drop_pass.cpp ]
        [ compile-fail drop_fail_1.cpp ]
        [ compile-fail drop_fail_2.cpp ]
        ;

in my Jamfile. What I really want is something like

    alias "drop_view" :
        [ run drop_pass.cpp ]
        [ compile-fail-grep "static assertion failed: There exists ..."
                            drop_fail_1.cpp ]
        [ compile-fail-grep "static assertion failed: Function ..."
                            drop_fail_2.cpp ]
        ;

so that I know compilation failed triggering static_assert I intended it
to trigger. What would be the simplest way to achieve the above?

Thanks in advance!

Tom


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