summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-10-23 02:33:23 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-10-23 02:33:23 +0000
commitbdc3a5b99af0dfbf2b0c4b1d59cd50f247b06522 (patch)
treef32cd2dfb11beaf68adfe5ffb95999c382d57532 /cmake
parent32136ac573d67cd0a604cff22b3ab32f21d6c8fc (diff)
Add llvm-go tool.
This tool lets us build LLVM components within the tree by setting up a $GOPATH that resembles a tree fetched in the normal way with "go get". It is intended that components such as the Go frontend will be built in-tree using this tool. Differential Revision: http://reviews.llvm.org/D5902 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake20
1 files changed, 12 insertions, 8 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 358a32cd107..8139d57ff83 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -493,16 +493,20 @@ else()
endif()
set(LLVM_BINDINGS "")
-find_program(GO_EXECUTABLE NAMES go DOC "go executable")
-if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
+if(WIN32)
message(STATUS "Go bindings disabled.")
else()
- execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
- RESULT_VARIABLE GO_CONFTEST)
- if(GO_CONFTEST STREQUAL "0")
- set(LLVM_BINDINGS "${LLVM_BINDINGS} go")
- message(STATUS "Go bindings enabled.")
+ find_program(GO_EXECUTABLE NAMES go DOC "go executable")
+ if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
+ message(STATUS "Go bindings disabled.")
else()
- message(STATUS "Go bindings disabled, need at least Go 1.2.")
+ execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
+ RESULT_VARIABLE GO_CONFTEST)
+ if(GO_CONFTEST STREQUAL "0")
+ set(LLVM_BINDINGS "${LLVM_BINDINGS} go")
+ message(STATUS "Go bindings enabled.")
+ else()
+ message(STATUS "Go bindings disabled, need at least Go 1.2.")
+ endif()
endif()
endif()