diff options
author | Chris Robinson <[email protected]> | 2015-08-13 15:20:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-08-13 15:20:34 -0700 |
commit | f134fbac5cca8a91a84e4890b14d09f66089d862 (patch) | |
tree | 8c1a0af64d2e05a081bcb524ae920c641578d10d /CMakeLists.txt | |
parent | c2f88ffad6ec07a0dc951bbb49c64ead149fe0ba (diff) |
Check for pthread_*_np functions in pthread_np.h when it exists
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 450aa89c..39fdd44e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -503,12 +503,18 @@ IF(NOT HAVE_WINDOWS_H) CHECK_SYMBOL_EXISTS(pthread_setschedparam pthread.h HAVE_PTHREAD_SETSCHEDPARAM) - CHECK_SYMBOL_EXISTS(pthread_setname_np pthread.h HAVE_PTHREAD_SETNAME_NP) - IF(NOT HAVE_PTHREAD_SETNAME_NP) - CHECK_SYMBOL_EXISTS(pthread_set_name_np pthread.h HAVE_PTHREAD_SET_NAME_NP) - ENDIF() IF(HAVE_PTHREAD_NP_H) + CHECK_SYMBOL_EXISTS(pthread_setname_np "pthread.h;pthread_np.h" HAVE_PTHREAD_SETNAME_NP) + IF(NOT HAVE_PTHREAD_SETNAME_NP) + CHECK_SYMBOL_EXISTS(pthread_set_name_np "pthread.h;pthread_np.h" HAVE_PTHREAD_SET_NAME_NP) + ENDIF() CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np "pthread.h;pthread_np.h" HAVE_PTHREAD_MUTEXATTR_SETKIND_NP) + ELSE() + CHECK_SYMBOL_EXISTS(pthread_setname_np pthread.h HAVE_PTHREAD_SETNAME_NP) + IF(NOT HAVE_PTHREAD_SETNAME_NP) + CHECK_SYMBOL_EXISTS(pthread_set_name_np pthread.h HAVE_PTHREAD_SET_NAME_NP) + ENDIF() + CHECK_SYMBOL_EXISTS(pthread_mutexattr_setkind_np pthread.h HAVE_PTHREAD_MUTEXATTR_SETKIND_NP) ENDIF() CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK) |