diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-06 20:42:04 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-05-06 20:42:04 +0000 |
commit | 69b20fd6f9543fbd11f5339adc335498b4b57769 (patch) | |
tree | 0f532821d825245f58016382c210eaef779f373d /cmake | |
parent | d5e8d821dd30b2deecf09b230a525814d58b69c0 (diff) | |
download | external_llvm-69b20fd6f9543fbd11f5339adc335498b4b57769.zip external_llvm-69b20fd6f9543fbd11f5339adc335498b4b57769.tar.gz external_llvm-69b20fd6f9543fbd11f5339adc335498b4b57769.tar.bz2 |
CMake: Use pthread library when requested and available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 13ecc37..62d9f31 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -34,6 +34,9 @@ macro(add_llvm_executable name) target_link_libraries(${name} imagehlp psapi) elseif( CMAKE_HOST_UNIX ) target_link_libraries(${name} dl) + if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) + target_link_libraries(${name} pthread) + endif() endif( MINGW ) endif( MSVC ) endmacro(add_llvm_executable name) |