Skip to content

Commit

Permalink
[cmake] Add a switch to enable/disable bindings.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D42026

llvm-svn: 332816
  • Loading branch information
vgvassilev committed May 20, 2018
1 parent 9ed890b commit ce73760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)
option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
option (LLVM_ENABLE_BINDINGS "Build bindings." ON)

set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
CACHE STRING "Doxygen-generated HTML documentation install directory")
Expand Down
6 changes: 3 additions & 3 deletions llvm/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,10 @@ else()
endif()

set(LLVM_BINDINGS "")
if(WIN32)
find_program(GO_EXECUTABLE NAMES go DOC "go executable")
if(WIN32 OR NOT LLVM_ENABLE_BINDINGS)
message(STATUS "Go bindings disabled.")
else()
find_program(GO_EXECUTABLE NAMES go DOC "go executable")
if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
message(STATUS "Go bindings disabled.")
else()
Expand Down Expand Up @@ -554,7 +554,7 @@ endif()
# Keep the version requirements in sync with bindings/ocaml/README.txt.
include(FindOCaml)
include(AddOCaml)
if(WIN32)
if(WIN32 OR NOT LLVM_ENABLE_BINDINGS)
message(STATUS "OCaml bindings disabled.")
else()
find_package(OCaml)
Expand Down

0 comments on commit ce73760

Please sign in to comment.