Allow llvm_find_program to find alternate names

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault 2013-07-08 20:24:49 +00:00
parent a68f58ab2b
commit cffecb4f2b

View File

@ -253,7 +253,8 @@ check_type_exists(error_t errno.h HAVE_ERROR_T)
function(llvm_find_program name)
string(TOUPPER ${name} NAME)
string(REGEX REPLACE "\\." "_" NAME ${NAME})
find_program(LLVM_PATH_${NAME} ${name})
find_program(LLVM_PATH_${NAME} NAMES ${ARGV})
mark_as_advanced(LLVM_PATH_${NAME})
if(LLVM_PATH_${NAME})
set(HAVE_${NAME} 1 CACHE INTERNAL "Is ${name} available ?")