<div dir="ltr"><div>I tried cmake4eclipse, and it's a mixed bag. It requires a lot of tweaking of the Eclipse project after you create it, and I'm pretty sure it suffers from the same problem of leaving you with an Eclipse project whose source tree reflects what is in the filesystem rather than what is defined in the CMake project.</div><div><br></div><div>It's really annoying that I spent all this time building a CMake project for a complex codebase, only to have the IDE present and index the entire source tree on the filesystem instead of the subset that is actually being built by the CMake configuration.</div><div><br></div><div>I should probably enhance my project-tweaking python script to add filters to the generated Eclipse project to hide anything that isn't in the CMake project.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 3, 2019 at 1:02 PM Martin Weber <<a href="mailto:fifteenknots505@gmail.com">fifteenknots505@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Mittwoch, 3. April 2019, 18:44:04 CEST schrieb Benjamin Shadwick:<br>
> Update - I think I found a tolerable workaround:<br>
> <br>
> If I invoke cmake with -DCMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES=OFF and<br>
> then inject a link to my include directory into the .project file, things<br>
> work a lot better:<br>
> - I get only one copy of each source file in the Open Resource dialog.<br>
> - I get source and header files in the Open Resource dialog.<br>
> - I can toggle between source and header.<br>
> - I can build from Eclipse.<br>
> - I get version control support, even in my include tree.<br>
> - Indexing is fast.<br>
> <br>
> It seems that Eclipse improved version control support quite a bit since<br>
> the CMake Eclipse generator was last touched. Unfortunately this seems to<br>
> also mean that a lot of the linked resources that CMake generates by<br>
> default now just add noise (hence my better results from turning them off).<br>
<br>
Newer versions of CDT (9.1+) seem to have trouble to properly read the <br>
.cproject file generated by cmake [1] [2]. <br>
<br>
Forget about running cmake manually and install _cmake4eclipse_ from the <br>
eclipse marketplace. It runs cmake automatically [3] and comes with support <br>
for the eclipse indexer. Some people even use it for CUDA in the nvidia <br>
insight IDE. (Disclaimer: I am the maintainer)<br>
Just try it with one of the example projects [4].<br>
<br>
Martin<br>
<br>
[1] <<a href="https://cmake.org/pipermail/cmake-developers/2019-March/031125.html" rel="noreferrer" target="_blank">https://cmake.org/pipermail/cmake-developers/2019-March/031125.html</a>><br>
[2] <<a href="https://www.eclipse.org/forums/index.php" rel="noreferrer" target="_blank">https://www.eclipse.org/forums/index.php</a>?<br>
t=msg&th=1094239&goto=1797891&#msg_1797891><br>
[3] <a href="https://github.com/15knots/cmake4eclipse#design-goals" rel="noreferrer" target="_blank">https://github.com/15knots/cmake4eclipse#design-goals</a><br>
[4] <a href="https://github.com/15knots/cmake4eclipse-sample-projects" rel="noreferrer" target="_blank">https://github.com/15knots/cmake4eclipse-sample-projects</a><br>
<br>
<br>
-- <br>
Cd wrttn wtht vwls s mch trsr.<br>
<br>
<br>
<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>