diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-27 15:49:33 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-27 15:49:33 +0000 |
commit | 1a53cbfb4a532511633ad752fcf7396a79857e98 (patch) | |
tree | 38f7a3cad6ac8c3eed2a48fcc576a1406ba88295 /cmake/modules/AddLLVM.cmake | |
parent | b5da3f6f98b28afc0c62572c164ffccb4004827f (diff) | |
download | llvm-1a53cbfb4a532511633ad752fcf7396a79857e98.tar.gz llvm-1a53cbfb4a532511633ad752fcf7396a79857e98.tar.bz2 llvm-1a53cbfb4a532511633ad752fcf7396a79857e98.tar.xz |
CMake: Set LIBS on llvm-config so we can query the system libraries
used by CMake with --ldflags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 1f0ff74c12..c531298a30 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -30,17 +30,11 @@ macro(add_llvm_executable name) target_link_libraries(${name} ${llvm_libs}) else( MSVC ) add_dependencies(${name} llvm-config.target) - if( MINGW ) - target_link_libraries(${name} imagehlp psapi) - elseif( CMAKE_HOST_UNIX ) - if( HAVE_LIBDL ) - target_link_libraries(${name} dl) - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - target_link_libraries(${name} pthread) - endif() - endif( MINGW ) endif( MSVC ) + get_system_libs(llvm_system_libs) + if( llvm_system_libs ) + target_link_libraries(${name} ${llvm_system_libs}) + endif() endmacro(add_llvm_executable name) |