dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #24608
Re: CMake break at error
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.
Johannes
Follow ups
References