Grepping for error messages

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Grepping for error messages

Boost - Build mailing list

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!

Unsubscribe & other changes: