This is an archive of the discontinued LLVM Phabricator instance.

Don't look for OCaml if LLVM_ENABLE_OCAMLDOC=OFF
AbandonedPublic

Authored by amadio on Dec 18 2017, 8:37 AM.

Details

Reviewers
whitequark

Diff Detail

Repository
rL LLVM

Event Timeline

amadio created this revision.Dec 18 2017, 8:37 AM

Because the "Could NOT find ..." messages interfere with automated checks of issues: https://bugs.gentoo.org/641536.
Maybe LLVM should consider at least using find_package($PKG QUIET) to avoid the unnecessary verbosity, although in the case of OCaml it didn't have any effect, due to the custom FindOCaml.cmake which does not implement the QUIET option.

whitequark requested changes to this revision.Dec 19 2017, 2:42 AM

Whether the bindings are enabled have nothing to do with whether ocamldoc is. Fix your automated checker.

This revision now requires changes to proceed.Dec 19 2017, 2:42 AM

I patched ROOT in Gentoo to avoid the error messages, but how could OCaml bindings be turned off in LLVM if OCaml is installed at configure time? (and avoiding the package lookup if it's not needed?)
Another comment is that include(FindOCaml) and find_package(OCaml) serve more or less the same purpose, so the error message appears twice. One of the lines could be removed.

how could OCaml bindings be turned off in LLVM if OCaml is installed at configure time? (and avoiding the package lookup if it's not needed?)

That's not supported for any of the bindings right now.

Another comment is that include(FindOCaml) and find_package(OCaml) serve more or less the same purpose, so the error message appears twice. One of the lines could be removed.

ACK on this.

amadio abandoned this revision.Nov 28 2018, 5:14 AM

This patch can be dropped as it no longer applies and there is now the option to disable OCaml bindings via LLVM_ENABLE_BINDINGS.