From 625b0d380ad552692a79f3f69d0f286b90bc0e98 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 23 Feb 2022 05:56:29 -0800 Subject: Use function overloading to handle pthread_setname_np differences --- CMakeLists.txt | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'CMakeLists.txt') 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 -#include -int main() -{ - pthread_setname_np(\"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_ONE_PARAM - ) - check_c_source_compiles(" -#include -#include -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 -int main() -{ - pthread_setname_np(\"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_ONE_PARAM - ) - check_c_source_compiles(" -#include -int main() -{ - pthread_setname_np(pthread_self(), \"%s\", \"testname\"); - return 0; -}" - PTHREAD_SETNAME_NP_THREE_PARAMS - ) endif() endif() endif() -- cgit v1.2.3