View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012223 | CMake | CMake | public | 2011-05-25 03:46 | 2011-10-23 09:07 | ||||
Reporter | wAy | ||||||||
Assigned To | Alex Neundorf | ||||||||
Priority | normal | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | any | OS | any | OS Version | any | ||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0012223: Support of linked resources in Eclipse/CDT (single files, not folders) | ||||||||
Description | When you´d like to add a single file that is placed outside the regular source folder, you can use the "linked resource" function of Eclipse/CDT. Using this you will get a link to a single file within your project, that can be edited, compiled, etc. as if it was in your source folder. At the moment it (seems that it(?)) isn´t possible to create links when using CMake to create a Eclipse project. The files will be compiled, as they should, but you won´t be able to see them in the Eclipse project explorer. | ||||||||
Steps To Reproduce | e.g. add_library( foo A_FILE_OUTSIDE_OF_THE_REGULAR_SOURCE_FOLDER) cmake -G "Eclipse CDT4 - Unix Makefiles" File->Import->Existing Projects into Workspace | ||||||||
Tags | CDT, Eclipse, linked resource | ||||||||
Attached Files | |||||||||
Relationships | ||||||||||||||||||||||||||||||||||||
|
Relationships |
Notes | |
(0026577) Alex Neundorf (developer) 2011-05-25 15:36 |
Indeed. How should this be done ? I could add special variables like CMAKE_ECLIPSE_LINKED_FOLDERS, which you could set to a list of folders for which linked resources are created. Or more general a list of files or directories for which linked resources are created. But maybe we can reuse something which already exists in cmake. How about using the source_group() command for this in Eclipse ? http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:source_group [^] So you could say source_group(MyFavouriteFiles FILES abc.c foo.c bar.c) and it would create a virtual folder named "MyFavouriteFiles" which contains links to the listed files. What do you think ? Alex |
(0026613) wAy (reporter) 2011-05-26 02:51 edited on: 2011-05-26 02:52 |
Well, at the moment our linked files look like this in the .project file: <linkedResources> <link> <name>Foobar.cpp</name> <type>1</type> <location>../foo/Foobar.cpp</location> </link> <link> ... </link> </linkedResources> So, there are no extra folders for the linked files. However, I think that there are many people, who prefer to have those files grouped also. So what about something like: CMAKE_ECLIPSE_LINKED_FILES where you may list all files: set( CMAKE_ECLIPSE_LINKED_FILES ../foo1/bar1.cpp ../foo2/bar2.cpp ../foo2/bar3.cpp) and a second one CMAKE_ECLIPSE_LINKED_FILES_FOLDER: set( CMAKE_ECLIPSE_LINKED_FOLDERS folder_for_my_linked_files ) This one could create those linked resources at top level if not set and otherwise a folder, where the linked files will be found in? Grouped folders won´t work, because if there are files in the same folder, that don´t belong to the project, you will see them within your project. At least, you can something similar to this with out-of-source-builds already. I don´t know if this is acceptable for you or fits to the concept cmake follows, but if so, I would prefer something that works in this way. Anyway, I would be happy about everything that makes it possible to link single files and see them in the eclipse project explorer. :-) Regards, wAy |
(0027627) Alex Neundorf (developer) 2011-10-23 09:07 |
The generated project now contains a virtual folder [Targets], where each target is again a sub-virtual folder, which contains links to all its source files, no matter where they are located. This is now in the "next" branch of cmake. Please give it a try and let me know if something doesn't work. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-05-25 03:46 | wAy | New Issue | |
2011-05-25 03:47 | wAy | Tag Attached: CDT | |
2011-05-25 03:47 | wAy | Tag Attached: Eclipse | |
2011-05-25 03:47 | wAy | Tag Attached: linked resource | |
2011-05-25 15:30 | Alex Neundorf | Assigned To | => Alex Neundorf |
2011-05-25 15:30 | Alex Neundorf | Status | new => assigned |
2011-05-25 15:36 | Alex Neundorf | Note Added: 0026577 | |
2011-05-26 02:51 | wAy | Note Added: 0026613 | |
2011-05-26 02:52 | wAy | Note Edited: 0026613 | |
2011-09-30 14:54 | Alex Neundorf | Relationship added | related to 0012213 |
2011-09-30 14:54 | Alex Neundorf | Relationship added | related to 0012417 |
2011-09-30 14:56 | Alex Neundorf | Relationship added | has duplicate 0012294 |
2011-09-30 15:17 | Alex Neundorf | Relationship added | related to 0012479 |
2011-09-30 15:20 | Alex Neundorf | Relationship added | related to 0011723 |
2011-09-30 15:20 | Alex Neundorf | Relationship added | related to 0012392 |
2011-10-23 09:07 | Alex Neundorf | Note Added: 0027627 | |
2011-10-23 09:07 | Alex Neundorf | Status | assigned => closed |
2011-10-23 09:07 | Alex Neundorf | Resolution | open => fixed |
2011-11-15 11:48 | Alex Neundorf | Relationship added | related to 0012579 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |