Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed

It seems that you are using an out-of-date caffe version that might not support your CUDA version (hence the first warnings about internal headers).

Cc: @robert.maynard