1 if(LLVM_BINDINGS MATCHES "go")
2 set(binpath ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX})
3 add_custom_command(OUTPUT ${binpath}
4 COMMAND ${GO_EXECUTABLE} build -o ${binpath} llvm-go.go
5 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-go.go
6 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
7 COMMENT "Building Go executable llvm-go")
8 add_custom_target(llvm-go ALL DEPENDS ${binpath})