From 2b4f49b4e73933787c2889d550ff23f91315d4a1 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 31 May 2013 22:31:38 +0200 Subject: [PATCH] Try llvm-config binaries with version suffix. This allows us to pick up the newest available version on several common Debian derivatives. GitHub: Fixes #376. --- cmake/Modules/FindLLVM.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindLLVM.cmake b/cmake/Modules/FindLLVM.cmake index d984fb97..4383fac5 100644 --- a/cmake/Modules/FindLLVM.cmake +++ b/cmake/Modules/FindLLVM.cmake @@ -22,7 +22,11 @@ # Note: The variable names were chosen in conformance with the offical CMake # guidelines, see ${CMAKE_ROOT}/Modules/readme.txt. -find_program(LLVM_CONFIG llvm-config ${LLVM_ROOT_DIR}/bin +# Try suffixed versions to pick up the newest LLVM install available on Debian +# derivatives. +find_program(LLVM_CONFIG + NAMES llvm-config-3.3 llvm-config-3.2 llvm-config-3.1 llvm-config + PATHS ${LLVM_ROOT_DIR}/bin DOC "Path to llvm-config tool.") if (NOT LLVM_CONFIG)