summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake4
-rw-r--r--cmake/modules/CMakeLists.txt3
-rwxr-xr-xcmake/modules/LLVMConfig.cmake1
3 files changed, 6 insertions, 2 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index fdf1df0c67..9d275a00a2 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -4,8 +4,8 @@ include(LLVMConfig)
macro(add_llvm_library name)
llvm_process_sources( ALL_FILES ${ARGN} )
add_library( ${name} ${ALL_FILES} )
- set( llvm_libs ${llvm_libs} ${name} PARENT_SCOPE)
- set( llvm_lib_targets ${llvm_lib_targets} ${name} PARENT_SCOPE )
+ set_property( GLOBAL APPEND PROPERTY LLVM_LIBS ${name} )
+ set_property( GLOBAL APPEND PROPERTY LLVM_LIB_TARGETS ${name} )
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
endif( LLVM_COMMON_DEPENDS )
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index 9365743b79..9a5566effb 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -1,5 +1,8 @@
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
+get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
+get_property(llvm_lib_targets GLOBAL PROPERTY LLVM_LIB_TARGETS)
+
configure_file(
LLVM.cmake
${llvm_cmake_builddir}/LLVM.cmake
diff --git a/cmake/modules/LLVMConfig.cmake b/cmake/modules/LLVMConfig.cmake
index 7a4a271b1c..349544edc3 100755
--- a/cmake/modules/LLVMConfig.cmake
+++ b/cmake/modules/LLVMConfig.cmake
@@ -59,6 +59,7 @@ endfunction(llvm_map_components_to_libraries)
function(explicit_map_components_to_libraries out_libs)
set( link_components ${ARGN} )
+ get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
string(TOUPPER "${llvm_libs}" capitalized_libs)
# Translate symbolic component names to real libraries:
foreach(c ${link_components})