I am using CMake to generate project files for Nsight (=beefed up version of Eclipse CDT) for a CUDA project. The problem is, that Eclipse does parse the compiler errors generated by nvcc.
I enabled the "nvcc error parser" in "project->properties->C/C++ Make Project->Error Parsers" and moved it to the top of the list, to no effect. Error parsing works fine for "native" nsight CUDA projects and for non-CUDA/non-nvcc c++ cmake generated projects.
The CMakeLists.txt is very basic:
cmake_minimum_required (VERSION 2.8)
project(myproject)
find_package(CUDA REQUIRED)
set(CUDA_SOURCES
myprojmain.cu
)
cuda_add_executable( myproject ${CUDA_SOURCES})
I traced down the root cause of this. In the .project XML project file, the sub-tree
projectDescription/buildSpec/buildCommand/arguments/dictionary/*
contains key/value pairs.
configures the list of error parsers:
For nvcc error parsing to work, nvcc.errorParse must be in the list. Order matters, so it is probably best to put it in front.
I hacked together a little python script for my personal use which patches Eclipse CDT projects accordingly. It is attached as fix-cmake-nsight-err-0.01.tar.gz to the cmake bug http://public.kitware.com/Bug/view.php?id=15277 Would be nice to see this integrated into CMake some time...