diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-01 15:54:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-03-01 15:54:40 +0000 |
commit | 93ed620d27ca77deaf44fe620ab7acb4f8dccd64 (patch) | |
tree | ac6af3d04ce60eee59dd84bc589c81fae20d5261 /cmake | |
parent | 5d03751938e96d52e58e6f5c29561aebdab2befa (diff) |
Refactor duplicated code for linking with pthread.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index c5be442a2c5..86a106d26cf 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -107,6 +107,10 @@ if( NOT PURE_WINDOWS ) check_library_exists(rt clock_gettime "" HAVE_LIBRT) endif() +if(HAVE_LIBPTHREAD) + set(PTHREAD_LIB pthread) +endif() + # Don't look for these libraries on Windows. Also don't look for them if we're # using MSan, since uninstrmented third party code may call MSan interceptors # like strlen, leading to false positives. |