MantisBT - CMake | |||||||||||||||
View Issue Details | |||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||
0015347 | CMake | CMake | public | 2015-01-13 11:10 | 2016-06-10 14:31 | ||||||||||
Reporter | Christopher Buxenstein | ||||||||||||||
Assigned To | Alex Neundorf | ||||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||||
Status | closed | Resolution | moved | ||||||||||||
Platform | Ubuntu 12.04 (32 bit) | OS | Linux | OS Version | 3.2.0 | ||||||||||
Product Version | |||||||||||||||
Target Version | Fixed in Version | ||||||||||||||
Summary | 0015347: Eclipse indexing no longer works | ||||||||||||||
Description | We are experiencing the same issue reported by another user (Tushar Soni) at http://cmake.3232098.n2.nabble.com/Cmake-3-0-2-Eclipse-project-indexing-issues-under-linux-td7588680.html. [^] Since I don't see their issue reported here, I am copying their response here so it is tracked. The issue is that Eclipse is only indexing the contents of [Source directory] and does not include subprojects. [Tushar Soni's original message] Hi, After generating Eclipse projects and importing them, Eclipse is not indexing all source files. I have detailed the issue (so sorry for the long email) and the experiments I have performed to resolve the issue. I would be really glad if someone could point out, what is going wrong or is there some bug? Not to go in too much details, here is how my directory (project) structure looks like in order to explain the issue in more details: Sources: $someDir/common/project_a/src/source_a.cpp $someDir/common/project_a/CMakeLists.txt -> Project A is a common lib, uses by many tests $someDir/tests/test_a/src/test_a.cpp $someDir/tests/test_a/CMakeLists.txt -> Includes the Project A using add_subdirectory and creates a share object Cmake build directories: $someDir/cmakeOut/common/project_a/ $someDir/cmakeOut/tests/test_a/ Cmake generated everything without errors and building the project using make or Eclipse was not an issue. The issue is only when I import the project in Eclipse (version 4.3.2) by Import -> General -> Existing Project -> $someDir/cmakeOut/tests/test_a/, the indexer does not seem to be working properly. It only indexes one source (test_a.cpp) whereas it should index two (test_a.cpp + sourc_a.cpp). this is just an example setup, in my actual project, only 1 source file gets indexed out of the 142 it should do. therefore it makes using Eclipse very hard! Now this is what I noticed with my experiments. Experiment 1: Change cmake version and compare I used the exact same files and folder structure but changed the cmake version to 2.8.10.2. The generated Eclipse project was able to index both the source files! This was mind boggling. I have to use the cmake 3.0.2 version, so I tried to narrow down the issue. When I did the diff of the .cproject created by the two cmake version I saw this: cmake 3.0.2 has this in the .cproject <pathentry kind="src" path="[Source directory]"/> <pathentry excluding="[Source directory]/|**/CMakeFiles/" kind="out" path=""/> cmake 2.8.10.2 has this in the .cproject <pathentry excluding="**/CMakeFiles/" kind="out" path=""/> The rest of the file is similar (except cmake path, which is obvious). Success Result: If I delete the line <pathentry kind="src" path="[Source directory]"/> from the .cproject and then import the project, indexing seems to be working!!! however I cant use this solution as my project is not checked in and every body using it needs to make this step manually. Experiment 2: Change the import method After a lot of googling I found out that someone was suggesting to import the project using this method (BTW, for totally different problem): Import -> C/C++ -> Existing Code as Makefile Project -> $someDir/cmakeOut/tests/test_a/ . When I did this, it again works! Mind boggling yet again! Just by chance I found out that this method works because, by importing this way Eclipse somehow modifies the .cproject and removed the lines like I did in first experiment. Conclusion: So based on my experiments this line in the .cproject is causing an issue with indexing: <pathentry kind="src" path="[Source directory]"/> I know most likely my conclusion is not correct but I do not have any other explanation. Also I do not know why this line is actually the issue! Therfore I am writing to you all to understand the issue a bit better. Maybe the issue is elsewhere. Thanks in advance! | ||||||||||||||
Steps To Reproduce | |||||||||||||||
Additional Information | |||||||||||||||
Tags | CMake, Eclipse | ||||||||||||||
Relationships |
| ||||||||||||||
Attached Files | 0001-Eclipse-add-links-to-subdirs-which-are-not-subdirs-o.patch (3,258) 2016-05-16 10:24 https://public.kitware.com/Bug/file/5691/0001-Eclipse-add-links-to-subdirs-which-are-not-subdirs-o.patch | ||||||||||||||
Issue History | |||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||
2015-01-13 11:10 | Christopher Buxenstein | New Issue | |||||||||||||
2015-01-13 12:18 | Christopher Buxenstein | Note Added: 0037676 | |||||||||||||
2015-01-13 12:18 | Christopher Buxenstein | Tag Attached: Eclipse | |||||||||||||
2015-01-13 12:19 | Christopher Buxenstein | Tag Attached: CMake | |||||||||||||
2015-01-13 14:31 | Brad King | Assigned To | => Alex Neundorf | ||||||||||||
2015-01-13 14:31 | Brad King | Status | new => assigned | ||||||||||||
2015-01-13 14:32 | Brad King | Note Added: 0037678 | |||||||||||||
2015-01-13 14:32 | Brad King | Relationship added | related to 0012213 | ||||||||||||
2015-01-13 14:32 | Brad King | Relationship added | related to 0013596 | ||||||||||||
2015-01-14 17:08 | Alex Neundorf | Note Added: 0037694 | |||||||||||||
2015-01-15 10:33 | Christopher Buxenstein | Note Added: 0037700 | |||||||||||||
2015-01-16 08:36 | Alex Neundorf | Note Added: 0037709 | |||||||||||||
2015-01-16 14:56 | Christopher Buxenstein | Note Added: 0037719 | |||||||||||||
2015-01-16 15:52 | Alex Neundorf | Note Added: 0037720 | |||||||||||||
2015-01-16 17:30 | Christopher Buxenstein | Note Added: 0037724 | |||||||||||||
2015-01-17 15:30 | Alex Neundorf | Note Added: 0037731 | |||||||||||||
2016-04-18 16:40 | Alex Neundorf | Note Added: 0040883 | |||||||||||||
2016-04-19 12:20 | Christopher Buxenstein | Note Added: 0040890 | |||||||||||||
2016-04-20 16:45 | Alex Neundorf | Note Added: 0040903 | |||||||||||||
2016-04-21 16:31 | Christopher Buxenstein | Note Added: 0040919 | |||||||||||||
2016-04-25 09:48 | Christopher Buxenstein | Note Added: 0040926 | |||||||||||||
2016-05-16 10:25 | Brad King | File Added: 0001-Eclipse-add-links-to-subdirs-which-are-not-subdirs-o.patch | |||||||||||||
2016-05-16 10:25 | Brad King | Note Added: 0041066 | |||||||||||||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042698 | |||||||||||||
2016-06-10 14:29 | Kitware Robot | Status | assigned => resolved | ||||||||||||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||||||||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|