[llvm] r332816 - [cmake] Add a switch to enable/disable bindings.
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Sun May 20 01:37:54 PDT 2018
Author: vvassilev
Date: Sun May 20 01:37:54 2018
New Revision: 332816
URL: http://llvm.org/viewvc/llvm-project?rev=332816&view=rev
Log:
[cmake] Add a switch to enable/disable bindings.
Differential Revision: https://reviews.llvm.org/D42026
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/config-ix.cmake
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=332816&r1=332815&r2=332816&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Sun May 20 01:37:54 2018
@@ -520,6 +520,7 @@ option (LLVM_INCLUDE_DOCS "Generate buil
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")
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=332816&r1=332815&r2=332816&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Sun May 20 01:37:54 2018
@@ -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()
@@ -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)
More information about the llvm-commits
mailing list