CMake, FindCUDA + Nsight -> no nvcc error parsing

Hi,

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)
project(cudaproj)

find_package(CUDA REQUIRED)

cuda_add_executable(cudaexe cudaproj.cu)
cuda_add_executable(regexe regular.cpp)

I have filed a bug with cmake which contains the above CMakeLists.txt and two sample files:
http://public.kitware.com/Bug/view.php?id=15277

Tested cmake versions:

  • cmake version 2.8.12.2 (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.

Thanks!
Georg
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

projectDescription/buildSpec/buildCommand/arguments/dictionary/*

contains key/value pairs.

org.eclipse.cdt.core.errorOutputParser

configures the list of error parsers:

nvcc.errorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.WorkingDirLocator;org.eclipse.cdt.core.GLDErrorParser;

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
[url]http://public.kitware.com/Bug/view.php?id=15277[/url]