mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
Merge pull request #3423 from Sonicadvance1/better_llvm_check
Improve our LLVM check
This commit is contained in:
commit
75eda242e4
@ -21,9 +21,24 @@ foreach(LLVM_CONFIG_NAME ${LLVM_CONFIG_EXECUTABLES})
|
|||||||
check_library_exists(LLVM-${LLVM_PACKAGE_VERSION} LLVMVerifyFunction "${LLVM_LDFLAGS}" HAVE_DYNAMIC_LLVM_${LLVM_PACKAGE_VERSION})
|
check_library_exists(LLVM-${LLVM_PACKAGE_VERSION} LLVMVerifyFunction "${LLVM_LDFLAGS}" HAVE_DYNAMIC_LLVM_${LLVM_PACKAGE_VERSION})
|
||||||
if (HAVE_DYNAMIC_LLVM_${LLVM_PACKAGE_VERSION})
|
if (HAVE_DYNAMIC_LLVM_${LLVM_PACKAGE_VERSION})
|
||||||
set(LLVM_LIBRARIES "${LLVM_LDFLAGS} -lLLVM-${LLVM_PACKAGE_VERSION}")
|
set(LLVM_LIBRARIES "${LLVM_LDFLAGS} -lLLVM-${LLVM_PACKAGE_VERSION}")
|
||||||
set(LLVM_FOUND 1)
|
set(CMAKE_REQUIRED_LIBRARIES ${LLVM_LIBRARIES})
|
||||||
|
CHECK_CXX_SOURCE_COMPILES(
|
||||||
|
"#include <llvm-c/Disassembler.h>
|
||||||
|
#include <llvm-c/Target.h>
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
LLVMInitializeAllTargetInfos();
|
||||||
|
LLVMInitializeAllTargetMCs();
|
||||||
|
LLVMInitializeAllDisassemblers();
|
||||||
|
return 0;
|
||||||
|
}"
|
||||||
|
LLVM_FOUND)
|
||||||
|
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
if (LLVM_FOUND)
|
||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user