CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB)
CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB)
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "" HAVE_PTHREAD_SETAFFINITY)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "" HAVE_PTHREAD_SETAFFINITY)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
message (STATUS "Warning: no support for SMPI automatic privatization on this platform")
SET(HAVE_PRIVATIZATION 0)
endif()
message (STATUS "Warning: no support for SMPI automatic privatization on this platform")
SET(HAVE_PRIVATIZATION 0)
endif()