Building on Ubuntu 16.04 with CUDA 6.5
Hi,
I can't build on Ubuntu 16.04 with gcc-4.8 and CUDA 6.5. I can't update CUDA to version 8.0 because my GPU don't support driver greater than 340. I get this error when compiling:

make -j install
[ 11%] Building NVCC (Device) object CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_extra.cu.o
[ 11%] Building NVCC (Device) object CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_core.cu.o
[ 17%] Building NVCC (Device) object CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cryptonight.cu.o
[ 64%] Built target xmrMinerCrypto
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
CMake Error at xmrMinerCuda_generated_cryptonight.cu.o.cmake:266 (message):
  Error generating file
  /home/FD/fgarcia/xmrMinerProject/build/CMakeFiles/xmrMinerCuda.dir/cryptonight/./xmrMinerCuda_generated_cryptonight.cu.o


CMakeFiles/xmrMinerCuda.dir/build.make:70: fallo en las instrucciones para el objetivo 'CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cryptonight.cu.o'
make[2]: *** [CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cryptonight.cu.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^
CMake Error at xmrMinerCuda_generated_cuda_cryptonight_core.cu.o.cmake:266 (message):
  Error generating file
  /home/FD/fgarcia/xmrMinerProject/build/CMakeFiles/xmrMinerCuda.dir/cryptonight/./xmrMinerCuda_generated_cuda_cryptonight_core.cu.o


CMakeFiles/xmrMinerCuda.dir/build.make:77: fallo en las instrucciones para el objetivo 'CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_core.cu.o'
make[2]: *** [CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_core.cu.o] Error 1
^CCMakeFiles/xmrMinerCuda.dir/build.make:63: fallo en las instrucciones para el objetivo 'CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_extra.cu.o'
make[2]: *** [CMakeFiles/xmrMinerCuda.dir/cryptonight/xmrMinerCuda_generated_cuda_cryptonight_extra.cu.o] Interrupción
CMakeFiles/Makefile2:67: fallo en las instrucciones para el objetivo 'CMakeFiles/xmrMinerCuda.dir/all'
make[1]: *** [CMakeFiles/xmrMinerCuda.dir/all] Interrupción
Makefile:127: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Interrupción

I see the same error in others applications with Ubuntu 16.04, take a look at this links:
https://github.com/BVLC/caffe/issues/4046
https://github.com/NVlabs/nvbio/issues/14

I tried adding 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")
on top of xmrMiner/CMakeLists.txt but does not work :(

Please help 