NSight Eclipse Edition using automatically generated make files not updating include file dependenci

I’m using NSight Eclipse Edition to build a shared object library. It’s a relatively simple project, with one local include and a few Thrust & Boost includes as well. I’m trying to use automatically generated make files to avoid the hassle of keeping a make file up to date. The build works fine - the shared object is correctly generated (in fact I’m rather impressed with how easy all this was to configure), but it is not recognizing the local include file as a dependency on the target, even though it is included directly into the .cu file, and the project explorer clearly recognizes the include (it’s shown under the .cu file). If I modify the header file, the build thinks there is nothing to do, but if I modify the source .cu file, it rebuilds properly as expected.

Under the Project Properties, I’m using the ‘External Builder’ setting, and telling the system to Generate Makefiles Automatically. It is using the default build command as well (make).

I can’t find any settings to manual specify the dependencies, and I can’t figure out why it doesn’t recognize the dependency in the build even though it clearly recognizes the dependency in the project explorer, unless the auto makefile generation is completely separate from the project explorer.

Any ideas or suggestions would be greatly appreciated.

Nsight Eclipse Edition regenerates all make scripts every time you do a rebuild from your workspace. All makefiles generated include commands for compiler to create dependency files, e.g. (I’m using “CUDA Segmentation Tree with Thrust” sample):

nvcc -I"/usr/local/cuda-5.0/samples/6_Advanced" -I"/usr/local/cuda-5.0/samples/common/inc" -I"/home/eostroukhov/cuda-workspace/sementationTreeThrust" -G -g -O0 -m64 -gencode arch=compute_35,code=sm_35 -odir "src" -M -o "src/segmentationTree.d" "../src/segmentationTree.cu"

In my case, header dependencies are properly taken into account when rebuilding - even when I do rebuild from the shell, outside the Nsight:

:Debug $ make all
make: Nothing to be done for `all'.
:Debug $ touch ../src/kernels.cuh 
:Debug $ make all
Building file: ../src/segmentationTree.cu
Invoking: NVCC Compiler
nvcc ... ../src/segmentationTree.cu
nvcc --compile ... ../src/segmentationTree.cu
Finished building: ../src/segmentationTree.cu
Building target: sementationTreeThrust
Invoking: NVCC Linker
nvcc -m64 -link -o  "sementationTreeThrust"  ./src/segmentationTree.o   
Finished building target: sementationTreeThrust

Please check the dependency files to see if your header is listed there.

Thanks for the response, and sorry for my own delay in responding - I’m new to the forums & I thought an email would get generated when someone responded (maybe there is a setting for that somewhere I guess).

Anyway, I did check, and the dependency file is being generated and the header file is correctly listed as a dependency there. I check the makefile as well, it is generating a file called ‘subdir.mk’ which is included into the makefile, and that file is adding the dependency file into the CU_DEPS build variable. Is there anything else you can think to check? It appears to me like it should work, yet it doesn’t. I don’t know if it matters, but I’m generating a shared object file, so the build appears to be performed in three stages. The first stage generates the dependency file, the second generates the ‘.o’ file, and the third generates the ‘.so’ file. The dependency file lists the ‘.o’ file as dependent on the ‘.h’ file.

Still not sure what happened, but by making a new project this problem went away. I changed the directory structure slightly, but I don’t know what else was different.

Do you have spaces in folder or file names?

No - no spaces anywhere.