[PATCH] D41356: Don't look for OCaml if LLVM_ENABLE_OCAMLDOC=OFF
Guilherme Amadio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 18 08:37:23 PST 2017
amadio created this revision.
amadio added a reviewer: whitequark.
Herald added a subscriber: mgorny.
Repository:
rL LLVM
https://reviews.llvm.org/D41356
Files:
cmake/config-ix.cmake
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -610,28 +610,30 @@
endif()
# Keep the version requirements in sync with bindings/ocaml/README.txt.
-include(FindOCaml)
-include(AddOCaml)
if(WIN32)
message(STATUS "OCaml bindings disabled.")
else()
- find_package(OCaml)
- if( NOT OCAML_FOUND )
- message(STATUS "OCaml bindings disabled.")
- else()
- if( OCAML_VERSION VERSION_LESS "4.00.0" )
- message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
+ if (LLVM_ENABLE_OCAMLDOC)
+ include(FindOCaml)
+ include(AddOCaml)
+ find_package(OCaml)
+ if(NOT OCAML_FOUND)
+ message(STATUS "OCaml bindings disabled.")
else()
- find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
- if( HAVE_OCAML_CTYPES )
- message(STATUS "OCaml bindings enabled.")
- find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
- set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
-
- set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING
- "Install directory for LLVM OCaml packages")
+ if(OCAML_VERSION VERSION_LESS "4.00.0")
+ message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
else()
- message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
+ find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
+ if(HAVE_OCAML_CTYPES)
+ message(STATUS "OCaml bindings enabled.")
+ find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
+ set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
+
+ set(LLVM_OCAML_INSTALL_PATH "${OCAML_STDLIB_PATH}" CACHE STRING
+ "Install directory for LLVM OCaml packages")
+ else()
+ message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
+ endif()
endif()
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41356.127369.patch
Type: text/x-patch
Size: 1901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171218/13ed6bc6/attachment.bin>
More information about the llvm-commits
mailing list