From b9069f84fe0fc5d911b9d476da693cda56a2009a Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 11 Dec 2016 12:18:12 -0800 Subject: [PATCH] Fix compiling against LLVM <4.0 --- atdna/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/atdna/CMakeLists.txt b/atdna/CMakeLists.txt index 06ad82a..4d2c993 100644 --- a/atdna/CMakeLists.txt +++ b/atdna/CMakeLists.txt @@ -13,6 +13,10 @@ include(FindLLVM.cmake) if(NOT LLVM_FOUND) message(STATUS "Unable to locate LLVM installation; skipping atdna") else() +find_library(LLVMDEMANGLE_LIB LLVMDemangle) +if (NOT LLVMDEMANGLE_LIB) + set(LLVMDEMANGLE_LIB "") +endif() list(APPEND LLVM_LIBS clangFrontend clangTooling @@ -31,7 +35,7 @@ list(APPEND LLVM_LIBS LLVMBitReader LLVMMC LLVMProfileData - LLVMDemangle + ${LLVMDEMANGLE_LIB} LLVMSupport) string(FIND ${LLVM_VERSION_STRING} "svn" SVN_FILTER_IDX)