summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-12 16:55:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-12 16:55:52 (GMT)
commitbd855ffb5576c7ab2b3281e96a1aebaf825f9e97 (patch)
tree6e16ce62656961f56f8495d271974b46295a2255
parent0e0571599fee709e3c353c521b617a0df149a672 (diff)
parentb328cbaadb8b8d81a6d24d4ea071a8ba98a16e00 (diff)
downloadCMake-bd855ffb5576c7ab2b3281e96a1aebaf825f9e97.zip
CMake-bd855ffb5576c7ab2b3281e96a1aebaf825f9e97.tar.gz
CMake-bd855ffb5576c7ab2b3281e96a1aebaf825f9e97.tar.bz2
Merge topic 'FindThreads-tsan'
b328cbaadb FindThreads: Add pthread_cancel to program to test for pthreads in libc Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Merge-request: !4056
-rw-r--r--Modules/FindThreads.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index 64576eb..85174d9 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -63,6 +63,7 @@ int main(void)
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
+ pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);