diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-29 23:52:01 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-29 23:52:01 +0000 |
commit | 2e1513d9cd7750db05048fb2af0c8cac0307fc5a (patch) | |
tree | f2c36cb8567a8fce0852937e2b09d6e7fe3cd808 /cmake/modules/LLVM-Config.cmake | |
parent | eeb57c7701ded683d660ed616966cfe7b1750337 (diff) | |
download | external_llvm-2e1513d9cd7750db05048fb2af0c8cac0307fc5a.zip external_llvm-2e1513d9cd7750db05048fb2af0c8cac0307fc5a.tar.gz external_llvm-2e1513d9cd7750db05048fb2af0c8cac0307fc5a.tar.bz2 |
Make my attempt to build up global deps variables actually utilize
globally scoped constructs. Also, round-trip these dependencies through
the LLVMConfig.cmake.in file thata is used by CMake-based clients of
"installed" (or built) LLVM trees.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136543 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/LLVM-Config.cmake')
-rwxr-xr-x | cmake/modules/LLVM-Config.cmake | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index d6b3124..b5f262a 100755 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -135,14 +135,14 @@ function(explicit_map_components_to_libraries out_libs) string(TOUPPER "${c}" capitalized) list(FIND capitalized_libs LLVM${capitalized} lib_idx) if( lib_idx LESS 0 ) - # The component is unknown. Maybe is an omitted target? - is_llvm_target_library(${c} iltl_result) - if( NOT iltl_result ) - message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") - endif() + # The component is unknown. Maybe is an omitted target? + is_llvm_target_library(${c} iltl_result) + if( NOT iltl_result ) + message(FATAL_ERROR "Library `${c}' not found in list of llvm libraries.") + endif() else( lib_idx LESS 0 ) - list(GET llvm_libs ${lib_idx} canonical_lib) - list(APPEND expanded_components ${canonical_lib}) + list(GET llvm_libs ${lib_idx} canonical_lib) + list(APPEND expanded_components ${canonical_lib}) endif( lib_idx LESS 0 ) endif( NOT idx LESS 0 ) endforeach(c) @@ -152,7 +152,8 @@ function(explicit_map_components_to_libraries out_libs) set(processed) while( cursor LESS lst_size ) list(GET expanded_components ${cursor} lib) - list(APPEND expanded_components ${LLVM_LIB_DEPS_${lib}}) + get_property(lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib}) + list(APPEND expanded_components ${lib_deps}) # Remove duplicates at the front: list(REVERSE expanded_components) list(REMOVE_DUPLICATES expanded_components) |