From 0245b12df2c1c0604d98e8f398f99a37bf34f978 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Wed, 3 Dec 2014 03:39:01 +0000 Subject: [PATCH] [OCaml] [cmake] Disable OCaml bindings if ctypes >=0.3 is not found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223195 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index abee8b6ee39..f806d9c54ed 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -529,10 +529,14 @@ else() if( OCAML_VERSION VERSION_LESS "4.00.0" ) message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.") else() - message(STATUS "OCaml bindings enabled.") - find_ocamlfind_package(ctypes VERSION 0.3) - find_ocamlfind_package(oUnit VERSION 2 OPTIONAL) - set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml") + find_ocamlfind_package(ctypes VERSION 0.3 OPTIONAL) + if( HAVE_OCAML_CTYPES ) + message(STATUS "OCaml bindings enabled.") + find_ocamlfind_package(oUnit VERSION 2 OPTIONAL) + set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml") + else() + message(STATUS "OCaml bindings disabled, need ctypes >=0.3.") + endif() endif() endif() endif()