X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cmake%2Fconfig-ix.cmake;h=5204f6c77ae94dac827ba8c9b02bcc41b93ace89;hb=5f3f254ed1d601c60d03e4437f75783774b03583;hp=358a32cd10736b71ee88d3060a106a586a582048;hpb=798ace2e58a4bbe607d907a9efc7388e221dc431;p=oota-llvm.git diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 358a32cd107..5204f6c77ae 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -42,7 +42,6 @@ function(check_type_exists type files variable) endfunction() # include checks -check_include_file_cxx(cxxabi.h HAVE_CXXABI_H) check_include_file(dirent.h HAVE_DIRENT_H) check_include_file(dlfcn.h HAVE_DLFCN_H) check_include_file(errno.h HAVE_ERRNO_H) @@ -81,6 +80,13 @@ check_symbol_exists(FE_INEXACT "fenv.h" HAVE_DECL_FE_INEXACT) check_include_file(mach/mach.h HAVE_MACH_MACH_H) check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H) +# size_t must be defined before including cxxabi.h on FreeBSD 10.0. +check_cxx_source_compiles(" +#include +#include +int main() { return 0; } +" HAVE_CXXABI_H) + # library checks if( NOT PURE_WINDOWS ) check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD) @@ -493,16 +499,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()