Schlagwort-Archive: cmake

compile a cuda program with gcc-6

If one experiences this example message while compiling:

/usr/local/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
 #error -- unsupported GNU version! gcc versions later than 6 are not supported!
  ^~~~~

Try the flag CUDA_NVCC_FLAGS and set the gcc compiler to version 6:
cmake -D CUDA_NVCC_FLAGS="-ccbin gcc-6" .. && make