Allow llvm_find_program to find alternate names

llvm-svn: 185859
This commit is contained in:
Matt Arsenault 2013-07-08 20:24:49 +00:00
parent cb20efc341
commit 88d13ab2d1

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 ?")