浏览代码

FindThreads: Clarify internal helper macro names

Brad King 3 年之前
父节点
当前提交
1ee8c545dd
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      Modules/FindThreads.cmake

+ 7 - 7
Modules/FindThreads.cmake

@@ -91,7 +91,7 @@ int main(void)
 
 
 # Internal helper macro.
 # Internal helper macro.
 # Do NOT even think about using it outside of this file!
 # Do NOT even think about using it outside of this file!
-macro(_check_threads_lib LIBNAME FUNCNAME VARNAME)
+macro(_threads_check_lib LIBNAME FUNCNAME VARNAME)
   if(NOT Threads_FOUND)
   if(NOT Threads_FOUND)
      CHECK_LIBRARY_EXISTS(${LIBNAME} ${FUNCNAME} "" ${VARNAME})
      CHECK_LIBRARY_EXISTS(${LIBNAME} ${FUNCNAME} "" ${VARNAME})
      if(${VARNAME})
      if(${VARNAME})
@@ -103,7 +103,7 @@ endmacro()
 
 
 # Internal helper macro.
 # Internal helper macro.
 # Do NOT even think about using it outside of this file!
 # Do NOT even think about using it outside of this file!
-macro(_check_pthreads_flag)
+macro(_threads_check_flag_pthread)
   if(NOT Threads_FOUND)
   if(NOT Threads_FOUND)
     # If we did not find -lpthreads, -lpthread, or -lthread, look for -pthread
     # If we did not find -lpthreads, -lpthread, or -lthread, look for -pthread
     if(NOT DEFINED THREADS_HAVE_PTHREAD_ARG)
     if(NOT DEFINED THREADS_HAVE_PTHREAD_ARG)
@@ -170,18 +170,18 @@ if(CMAKE_HAVE_PTHREAD_H)
       # way, but not backwards compatible as one must also pass -pthread
       # way, but not backwards compatible as one must also pass -pthread
       # as compiler flag then.
       # as compiler flag then.
       if (THREADS_PREFER_PTHREAD_FLAG)
       if (THREADS_PREFER_PTHREAD_FLAG)
-         _check_pthreads_flag()
+         _threads_check_flag_pthread()
       endif ()
       endif ()
 
 
       if(CMAKE_SYSTEM MATCHES "GHS-MULTI")
       if(CMAKE_SYSTEM MATCHES "GHS-MULTI")
-        _check_threads_lib(posix pthread_create CMAKE_HAVE_PTHREADS_CREATE)
+        _threads_check_lib(posix pthread_create CMAKE_HAVE_PTHREADS_CREATE)
       endif()
       endif()
-      _check_threads_lib(pthreads pthread_create CMAKE_HAVE_PTHREADS_CREATE)
-      _check_threads_lib(pthread  pthread_create CMAKE_HAVE_PTHREAD_CREATE)
+      _threads_check_lib(pthreads pthread_create CMAKE_HAVE_PTHREADS_CREATE)
+      _threads_check_lib(pthread  pthread_create CMAKE_HAVE_PTHREAD_CREATE)
     endif()
     endif()
   endif()
   endif()
 
 
-  _check_pthreads_flag()
+  _threads_check_flag_pthread()
 endif()
 endif()
 
 
 if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_PTHREAD)
 if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_PTHREAD)