I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/
#include #include #define NU
I believe the proper way of adding pthread in CMake is with the following
pthread
CMake
find_package (Threads REQUIRED) target_link_libraries(helloworld ${CMAKE_THREAD_LIBS_INIT} )