diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-23 02:37:24 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-23 02:37:24 +0000 |
commit | db917fe8aa183ae0644c53d8a60f57bd5877686c (patch) | |
tree | 4ff5cb5d01835f8a31214d94e16d974d730fa65f /cmake/modules | |
parent | 2ddb6f1440acd63b6d9e00c3033f8aa5d6627557 (diff) |
CMake: Use libdl only when available. Fixes build on FreeBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 62d9f3195b..1f0ff74c12 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -33,7 +33,9 @@ macro(add_llvm_executable name) if( MINGW ) target_link_libraries(${name} imagehlp psapi) elseif( CMAKE_HOST_UNIX ) - target_link_libraries(${name} dl) + if( HAVE_LIBDL ) + target_link_libraries(${name} dl) + endif() if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) target_link_libraries(${name} pthread) endif() |