diff options
author | Chris Robinson <[email protected]> | 2022-02-23 05:56:29 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-02-23 05:56:29 -0800 |
commit | 625b0d380ad552692a79f3f69d0f286b90bc0e98 (patch) | |
tree | ff2a51e4f47d1751aa9956d1a982a4ea1408a1cb /CMakeLists.txt | |
parent | 598c1aa224243b80e4856a0ce8dc3921ca961f83 (diff) |
Use function overloading to handle pthread_setname_np differences
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c9681de4..ad956b10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -566,51 +566,11 @@ if(NOT WIN32) 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) - else() - check_c_source_compiles(" -#include <pthread.h> -#include <pthread_np.h> -int main() -{ - pthread_setname_np(\"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_ONE_PARAM - ) - check_c_source_compiles(" -#include <pthread.h> -#include <pthread_np.h> -int main() -{ - pthread_setname_np(pthread_self(), \"%s\", \"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_THREE_PARAMS - ) endif() 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) - else() - check_c_source_compiles(" -#include <pthread.h> -int main() -{ - pthread_setname_np(\"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_ONE_PARAM - ) - check_c_source_compiles(" -#include <pthread.h> -int main() -{ - pthread_setname_np(pthread_self(), \"%s\", \"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_THREE_PARAMS - ) endif() endif() endif() |