In CMakeList.txt I do want to add the -std=g++0x
to the g++ options like this:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x)
However all the CMAKE_CXX_FLAGS
are passed on to nvcc as well, via the -Xcompiler
flag (which is done automatically). However nvcc doesn't work with the gnu++0x
standard.
Is there a way of passing the flag to g++ but not to nvcc
The compiler is specified by
if(CUDA_NVCC_HOST_COMPILER)
list(APPEND CUDA_NVCC_FLAGS "--compiler-bindir=${CUDA_NVCC_HOST_COMPILER}")
endif(CUDA_NVCC_HOST_COMPILER)