← Back to team overview

dolfin team mailing list archive

Re: CMake break at error

 

On Tue, Oct 04, 2011 at 09:58:13AM +0200, Johannes Ring wrote:
> On Fri, Sep 30, 2011 at 2:44 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> > On Fri, Sep 30, 2011 at 09:25:03AM +0200, Johannes Ring wrote:
> >> On Fri, Sep 30, 2011 at 9:18 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> >> > On Fri, Sep 30, 2011 at 09:06:43AM +0200, Johannes Ring wrote:
> >> >> On Thu, Sep 29, 2011 at 9:38 PM, Anders Logg <logg@xxxxxxxxx> wrote:
> >> >> > Would it be possible to get CMake to break when it encounters an
> >> >> > error?
> >> >>
> >> >> Yes, inserting message(FATAL_ERROR "message to display") will stop
> >> >> CMake immediately.
> >> >
> >> > ok, so is there a reason not to do this?
> >>
> >> Yes, it should ideally be handled by find_package. From the CMake
> >> manual: "The REQUIRED option stops processing with an error message if
> >> the package cannot be found."
> >>
> >> I can add some FATAL_ERROR messages if I can't figure out why it doesn't work.
> >
> > ok, thanks.
>
> I could not find out why it didn't work so I had to add a FATAL_ERROR
> message when UFC is missing or the wrong version is used.

Good. UFC is usually the place where things go wrong for me (when I
have forgotten to setup my FEniCS path).

--
Anders


References