is_llvm_target_library: recognize libraries without the LLVM prefix.

Without this cmake fails at configuration when some target pass
"native" on LLVM_LINK_COMPONENTS and that is expanded to "X86".

llvm-svn: 127679
This commit is contained in:
Oscar Fuentes 2011-03-15 14:53:53 +00:00
parent 3a68eb150b
commit 638b8b783f
1 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,8 @@ function(is_llvm_target_library library return_var)
string(TOUPPER "${library}" capitalized_lib)
string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
foreach(t ${targets})
if( capitalized_lib STREQUAL "LLVM${t}" OR
if( capitalized_lib STREQUAL t OR
capitalized_lib STREQUAL "LLVM${t}" OR
capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR
capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR
capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR