CMake: corrections on LLVM.cmake external services.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Oscar Fuentes 2010-08-11 00:51:32 +00:00
parent 38ae997e63
commit e1fadb1dc6
3 changed files with 15 additions and 4 deletions

View File

@ -2,7 +2,8 @@ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
configure_file( configure_file(
LLVM.cmake LLVM.cmake
${llvm_cmake_builddir}/LLVM.cmake) ${llvm_cmake_builddir}/LLVM.cmake
@ONLY)
install(FILES install(FILES
${llvm_cmake_builddir}/LLVM.cmake ${llvm_cmake_builddir}/LLVM.cmake

View File

@ -1,3 +1,5 @@
# This file provides information and services to the final user.
set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@) set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@)
set(llvm_libs @llvm_libs@) set(llvm_libs @llvm_libs@)
@ -10,10 +12,18 @@ set(LLVM_TOOLS_BINARY_DIR @LLVM_TOOLS_BINARY_DIR@)
set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@)
if( NOT EXISTS LLVMConfig.cmake ) set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@)
# We try to include using the current setting of CMAKE_MODULE_PATH,
# which suppossedly was filled by the user with the directory where
# this file was installed:
include( LLVMConfig OPTIONAL RESULT_VARIABLE LLVMCONFIG_INCLUDED )
# If failed, we assume that this is an un-installed build:
if( NOT LLVMCONFIG_INCLUDED )
set(CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH}
"@LLVM_SOURCE_DIR@/cmake/modules") "@LLVM_SOURCE_DIR@/cmake/modules")
include( LLVMConfig )
endif() endif()
include( LLVMConfig )

View File

@ -53,7 +53,7 @@ endfunction(explicit_llvm_config)
function(llvm_map_components_to_libraries OUT_VAR) function(llvm_map_components_to_libraries OUT_VAR)
explicit_map_components_to_libraries(result ${ARGN}) explicit_map_components_to_libraries(result ${ARGN})
get_system_libs(sys_result) get_system_libs(sys_result)
set( ${OUT_VAR} ${result} ${sys_result} ) set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE )
endfunction(llvm_map_components_to_libraries) endfunction(llvm_map_components_to_libraries)