[CMake] Get diagnostics when FIND_XXX fails
Marcel Loose
loose at astron.nl
Thu Dec 9 08:17:00 EST 2010
Hi all,
Is there a way to get useful diagnostics when, e.g., FIND_PATH()
fails.
I would like to be able to get a message like:
Failed to find myheader.h, while searching the following directories:
/foo /bar /baz.
Now, I often find myself browsing a FindXXX.cmake file when it fails to
find some file, and try to understand why it couldn't find it. This is
not as easy as it sounds, due to the fact that the FIND_XXX command have
a quite a number of options, like HINTS and PAHTS, which makes it quite
hard to figure out which directories have been searched.
As a last resort I sometimes use strace, but this is IMHO really not
the way it should be.
Best regards,
Marcel Loose.
More information about the CMake
mailing list