Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_497e1/fast && /usr/bin/make -f CMakeFiles/cmTC_497e1.dir/build.make CMakeFiles/cmTC_497e1.dir/build
make[1]: Entering directory '/home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_497e1.dir/src.c.o
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/arm-hisiv300-linux-uclibcgnueabi-gcc   -lpthread -DCMAKE_HAVE_LIBC_PTHREAD   -o CMakeFiles/cmTC_497e1.dir/src.c.o   -c /home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_497e1
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_497e1.dir/link.txt --verbose=1
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/arm-hisiv300-linux-uclibcgnueabi-gcc -lpthread -DCMAKE_HAVE_LIBC_PTHREAD    -rdynamic CMakeFiles/cmTC_497e1.dir/src.c.o  -o cmTC_497e1 
CMakeFiles/cmTC_497e1.dir/src.c.o: In function `main':
src.c:(.text+0x70): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_497e1.dir/build.make:86: recipe for target 'cmTC_497e1' failed
make[1]: *** [cmTC_497e1] Error 1
make[1]: Leaving directory '/home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_497e1/fast' failed
make: *** [cmTC_497e1/fast] Error 2


Source file was:
#include <pthread.h>

void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_3a6b4/fast && /usr/bin/make -f CMakeFiles/cmTC_3a6b4.dir/build.make CMakeFiles/cmTC_3a6b4.dir/build
make[1]: Entering directory '/home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3a6b4.dir/CheckFunctionExists.c.o
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/arm-hisiv300-linux-uclibcgnueabi-gcc   -lpthread -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_3a6b4.dir/CheckFunctionExists.c.o   -c /usr/local/share/cmake-3.15/Modules/CheckFunctionExists.c
Linking C executable cmTC_3a6b4
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3a6b4.dir/link.txt --verbose=1
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/arm-hisiv300-linux-uclibcgnueabi-gcc -lpthread -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_3a6b4.dir/CheckFunctionExists.c.o  -o cmTC_3a6b4 -lpthreads 
/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_3a6b4.dir/build.make:86: recipe for target 'cmTC_3a6b4' failed
make[1]: *** [cmTC_3a6b4] Error 1
make[1]: Leaving directory '/home/book/hisi3518_lora/cmake-build-debug/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_3a6b4/fast' failed
make: *** [cmTC_3a6b4/fast] Error 2



