View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015277 | CMake | CMake | public | 2014-12-03 05:20 | 2016-06-10 14:31 | ||||
Reporter | Georg Altmann | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015277: Eclipse CDT: CUDA project error parsing broken for Nvidia Nsight | ||||||||
Description | When using cmake -G"Eclipse CDT4 - Unix Makefiles" with the FindCUDA.cmake module for generating Eclipse projects for NVidia Nsight, error parsing does not work in Eclipse. NVidia Nsight is a beefed up version of Elcipse CDT. 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. 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 | ||||||||
Steps To Reproduce | System Requirements: Have GCC/g++, CUDA and Nsight installed. 1. Download cudaproj.tar.gz from this bug. 2. Extract cudaproj.tar.gz 3. mkdir cudaproj-build && cd cudaproj-build 4. cmake -G"Eclipse CDT4 - Unix Makefiles" ../cudaproj 5. Import the project from cudaproj-build into Nsight, 6. Build the project. 7. In the console the compiler error ".../cudaproj/regular.cpp:3:2: error: āCā was not declared in this scope" is highlighted, double-clicking on it opens regular.cpp and the cursor is on line 3. 8. In the console the compiler error "cudaproj.cu(4): error: identifier "syntax" is undefined" is _not_ highlighted while it should be. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | cudaproj.tar.gz [^] (393 bytes) 2014-12-03 05:20 fix-cmake-nsight-err-0.01.tar.gz [^] (1,375 bytes) 2014-12-08 11:38 | ||||||||
Relationships | |
Relationships |
Notes | |
(0037367) Georg Altmann (reporter) 2014-12-03 05:22 |
Error parsing works fine for "native" nsight CUDA projects and for non-CUDA/non-nvcc c++ sources. |
(0037407) Georg Altmann (reporter) 2014-12-08 11:38 |
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. <key>org.eclipse.cdt.core.errorOutputParser</key> configures the list of error parsers: <value>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;</value> 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 |
(0037409) Brad King (manager) 2014-12-08 11:50 |
Re 0015277:0037407: The value of org.eclipse.cdt.core.errorOutputParser is populated here: http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmExtraEclipseCDT4Generator.cxx;hb=v3.0.2#l415 [^] That could be extended to add other error parsers, either through some kind of configuration value the project or user can set, through detection, or perhaps just a hard-coded value. I don't personally use any of these tools so I'm not sure which approach would be best. |
(0037412) Georg Altmann (reporter) 2014-12-08 12:21 |
Looking at the code for compilerId, checking this for nvcc is not enough, since a CUDA project is likely to use nvcc next to other compilers and nvcc is not necessarily set as CMAKE_CXX_COMPILER: FindCUDA does not touch CMAKE_CXX_COMPILER but configures CUDA_NVCC_EXECUTABLE and others separately. IMHO FindCUDA should trigger a setting which makes cmake add nvcc.errorParser to the list of error parsers. This setting should be user configurable. Rationale: nvcc error parsing could break parsing for some other compiler or FindCUDA is not used. Maybe we can add a new global property for this? There already is ECLIPSE_EXTRA_NATURES ECLIPSE_ERROR_PARSERS Doc: List of error parsers to use for the generated Eclipse project file. This configures the list of error parsers used by Eclipse. The default is to set the error parser based on the used C or C++ compiler. If this property is defined, it defines the list of error parsers exclusively. Non-exhaustive list of error parsers: * org.eclipse.cdt.core.VCErrorParser MS Visual Studio * org.eclipse.cdt.core.GmakeErrorParser GNU Make * org.eclipse.cdt.core.MakeErrorParser Make * org.eclipse.cdt.core.GCCErrorParser GCC * org.eclipse.cdt.core.GASErrorParser GNU As * org.eclipse.cdt.core.GLDErrorParser GNU LD * nvcc.errorParser NVidia nvcc (only defined in NSight) I can prepare a patch if this is useful. |
(0037415) Brad King (manager) 2014-12-08 14:02 |
Re 0015277:0037412: I think a ECLIPSE_ERROR_PARSERS property makes sense, and FindCUDA could set that once the generator offers it. If you work on a patch please read CONTRIBUTING.rst and send the patch to the list for review. |
(0037463) Georg Altmann (reporter) 2014-12-15 11:55 |
JFYI: I do not have the resources to implement a patch for ECLIPSE_ERROR_PARSERS right now. I will bear with the hackish solution from fix-cmake-nsight-err-0.01.tar.gz. If anybody else is willing to implent ECLIPSE_ERROR_PARSERS as described above, please go ahead. |
(0042679) Kitware Robot (administrator) 2016-06-10 14:29 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-12-03 05:20 | Georg Altmann | New Issue | |
2014-12-03 05:20 | Georg Altmann | File Added: cudaproj.tar.gz | |
2014-12-03 05:22 | Georg Altmann | Note Added: 0037367 | |
2014-12-08 11:38 | Georg Altmann | File Added: fix-cmake-nsight-err-0.01.tar.gz | |
2014-12-08 11:38 | Georg Altmann | Note Added: 0037407 | |
2014-12-08 11:48 | Brad King | Summary | Nvidia Nsight (eclipse cdt for CUDA) error parsing broken => Eclipse CDT: CUDA project error parsing broken for Nvidia Nsight |
2014-12-08 11:50 | Brad King | Note Added: 0037409 | |
2014-12-08 12:21 | Georg Altmann | Note Added: 0037412 | |
2014-12-08 14:02 | Brad King | Note Added: 0037415 | |
2014-12-15 11:55 | Georg Altmann | Note Added: 0037463 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042679 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |