I'm trying to migrate an existing C/C++ CUDA project into Nsight Eclipse. I'm using a manually written makefile to build the project, however I am getting the following error:
#error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
I previously had this error when I was using just a makefile outside of Nsight, however I fixed it by creating symlinks to gcc-4.9 and g++-4.9 in /usr/local/cuda-7.5/bin. This does not work for Nsight.
Here is my makefile (NOTE: I've set the CUDA_HOME environment variable inside Nsight):
NVCC := nvcc
MODULES := FA_kernels FD_kernels MEM_kernels MOD_kernels .
SRC_DIR := $(MODULES)
BUILD_DIR := $(addprefix build/,$(MODULES))
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cu))
OBJ := $(patsubst %.cu,build/%.o,$(SRC))
HEADERS := headers $(CUDA_HOME)/include $(CUDA_HOME)/samples/common/inc
INCLUDES := $(addprefix -I,$(HEADERS))
build/%.o: %.cu
$(NVCC) $(INCLUDES) -c $< -o $@
.PHONY: all checkdirs clean
all: checkdirs build/lem
build/lem: $(OBJ)
$(NVCC) $^ -o $@ -lgdal
checkdirs: $(BUILD_DIR)
$(BUILD_DIR):
@mkdir -p $@
clean:
@rm -rf build
Is there a way I can force Nsight to use gcc-4.9 and g++-4.9?