mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 21:20:29 +00:00
[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
This commit is contained in:
parent
d1fd57765b
commit
62bc28788b
@ -410,12 +410,12 @@ else ()
|
||||
set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
|
||||
|
||||
# We don't have an ASM parser for all architectures yet.
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
|
||||
set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser)
|
||||
endif ()
|
||||
|
||||
# We don't have an disassembler for all architectures yet.
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
|
||||
if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
|
||||
set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler)
|
||||
endif ()
|
||||
endif ()
|
||||
@ -526,7 +526,7 @@ else()
|
||||
if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
|
||||
message(STATUS "Go bindings disabled.")
|
||||
else()
|
||||
execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
|
||||
execute_process(COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/bindings/go/conftest.go
|
||||
RESULT_VARIABLE GO_CONFTEST)
|
||||
if(GO_CONFTEST STREQUAL "0")
|
||||
set(LLVM_BINDINGS "${LLVM_BINDINGS} go")
|
||||
|
Loading…
Reference in New Issue
Block a user