llvm.org GIT mirror llvm / 62bc287
[CMake] Allow LLVM to be embedded and built in a subfolder as part of another project. Patch by Bertrand Bellenot! Reviewed by Chris Bieneman and me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272481 91177308-0d34-0410-b5e6-96231b3b80d8 Vassil Vassilev 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
409409 set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
410410
411411 # We don't have an ASM parser for all architectures yet.
412 if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
412 if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
413413 set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser)
414414 endif ()
415415
416416 # We don't have an disassembler for all architectures yet.
417 if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
417 if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
418418 set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler)
419419 endif ()
420420 endif ()
525525 if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
526526 message(STATUS "Go bindings disabled.")
527527 else()
528 execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
528 execute_process(COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/bindings/go/conftest.go
529529 RESULT_VARIABLE GO_CONFTEST)
530530 if(GO_CONFTEST STREQUAL "0")
531531 set(LLVM_BINDINGS "${LLVM_BINDINGS} go")