aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-08-02 21:24:12 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-08-02 21:24:12 +0000
commit5510e5e9b5c82063ed63a76632878135f2e9e67b (patch)
tree9d4491fc466df0138d6d5e9347d9ca45ecc2865c /cmake
parent9ac47c51c59f03be1631a337ef73605a1f30a606 (diff)
Improve discrimination of unknown libraries from ignored targets on
LLVMConfig. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/modules/LLVMConfig.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake
index 03a5c371b4..7d636eaa76 100755
--- a/cmake/modules/LLVMConfig.cmake
+++ b/cmake/modules/LLVMConfig.cmake
@@ -23,8 +23,10 @@ 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}CODEGEN" OR
+ if( 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
capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR
capitalized_lib STREQUAL "LLVM${t}INFO" )
set(${return_var} ON PARENT_SCOPE)
@@ -104,22 +106,24 @@ function(explicit_map_components_to_libraries out_libs)
list(GET expanded_components 0 c)
string(TOUPPER "${c}" capitalized)
list(FIND capitalized_libs ${capitalized} idx)
+ set(add_it ON)
if( idx LESS 0 )
# The library is unkown. Maybe is an ommitted target?
is_llvm_target_library(${c} iltl_result)
- if( iltl_result )
- break()
- else()
+ if( NOT iltl_result )
message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
endif()
+ set(add_it OFF)
endif( idx LESS 0 )
list(GET llvm_libs ${idx} canonical_lib)
list(REMOVE_ITEM result ${canonical_lib})
- list(APPEND result ${canonical_lib})
foreach(c ${MSVC_LIB_DEPS_${canonical_lib}})
list(REMOVE_ITEM expanded_components ${c})
endforeach()
- list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
+ if( add_it )
+ list(APPEND result ${canonical_lib})
+ list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
+ endif()
list(REMOVE_AT expanded_components 0)
list(LENGTH expanded_components lst_size)
endwhile( 0 LESS ${lst_size} )