CMake, FindCUDA + Nsight -> no nvcc error parsing


I am trying to get nvcc error parsing to work with Nsight on Linux when generating Eclipse project files with cmake.

Enabling the “nvcc error parser” in “project->properties->C/C++ Make
Project->Error Parsers” and moving it to the top of the list in the project properties has no effect.

Error parsing works for non-CUDA/non-nvcc sources.

Here is a very basic CMakeLists.txt I am using for testing this issue:

cmake_minimum_required (VERSION 2.8)

find_package(CUDA REQUIRED)

cuda_add_executable(regexe regular.cpp)

I have filed a bug with cmake which contains the above CMakeLists.txt and two sample files:

Tested cmake versions:

  • cmake version (Ubuntu 14.04.1 LTS)
  • cmake version 3.1.0-rc2 (built from source)
  • CUDA 6.5
  • Nsight Eclipse Edition 6.5
  • Eclipse C/C++ Development Tools Version: 8.1.2.nvidia-qualifier

Any insight on how error parsing is influenced by cmake is helpful.

cudaproj.tar.gz (393 Bytes)

Just realized I can attach files here -> attached cudaproj.tar.gz with the CMakeLists.txt and test sources.

I traced down the root cause of this.
In the .project XML project file, the sub-tree


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