[CMake] Eclipse generator question
Martin Weber
fifteenknots505 at gmail.com
Wed Apr 3 16:01:49 EDT 2019
Am Mittwoch, 3. April 2019, 18:44:04 CEST schrieb Benjamin Shadwick:
> Update - I think I found a tolerable workaround:
>
> If I invoke cmake with -DCMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES=OFF and
> then inject a link to my include directory into the .project file, things
> work a lot better:
> - I get only one copy of each source file in the Open Resource dialog.
> - I get source and header files in the Open Resource dialog.
> - I can toggle between source and header.
> - I can build from Eclipse.
> - I get version control support, even in my include tree.
> - Indexing is fast.
>
> It seems that Eclipse improved version control support quite a bit since
> the CMake Eclipse generator was last touched. Unfortunately this seems to
> also mean that a lot of the linked resources that CMake generates by
> default now just add noise (hence my better results from turning them off).
Newer versions of CDT (9.1+) seem to have trouble to properly read the
.cproject file generated by cmake [1] [2].
Forget about running cmake manually and install _cmake4eclipse_ from the
eclipse marketplace. It runs cmake automatically [3] and comes with support
for the eclipse indexer. Some people even use it for CUDA in the nvidia
insight IDE. (Disclaimer: I am the maintainer)
Just try it with one of the example projects [4].
Martin
[1] <https://cmake.org/pipermail/cmake-developers/2019-March/031125.html>
[2] <https://www.eclipse.org/forums/index.php?
t=msg&th=1094239&goto=1797891&#msg_1797891>
[3] https://github.com/15knots/cmake4eclipse#design-goals
[4] https://github.com/15knots/cmake4eclipse-sample-projects
--
Cd wrttn wtht vwls s mch trsr.
More information about the CMake
mailing list