<div dir="ltr">Oops, meant to send this to the mailing list, but GMail keeps trying to divert me.<br><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Benjamin Shadwick</b> <span dir="ltr"><<a href="mailto:benshadwick@gmail.com">benshadwick@gmail.com</a>></span><br>Date: Wed, Apr 3, 2019 at 2:52 PM<br>Subject: Re: [CMake] Eclipse generator question<br>To: Martin Weber <<a href="mailto:fifteenknots505@gmail.com">fifteenknots505@gmail.com</a>><br></div><br><br><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 3, 2019 at 2:18 PM Martin Weber <<a href="mailto:fifteenknots505@gmail.com" target="_blank">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, 22:26:59 CEST schrieb Benjamin Shadwick:<br>
> I tried cmake4eclipse, and it's a mixed bag. It requires a lot of tweaking<br>
<br>
Really? Just set _CMake Builder (portable)_ as the current builder and build.<br></blockquote><div><br></div><div>It required a lot more tweaking than that for an out of source build, including manually enabling the CMAKE includes and defines providers.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> of the Eclipse project after you create it, and I'm pretty sure it suffers<br>
> from the same problem of leaving you with an Eclipse project whose source<br>
> tree reflects what is in the filesystem rather than what is defined in the<br>
> CMake project.<br>
<br>
What does that mean: _an Eclipse project whose source tree reflects what is in <br>
the filesystem rather than what is defined in the CMake project._ ??<br></blockquote><div><br></div><div>This is exactly what I'm getting at: People have marinated so much in the way Eclipse works by default that what I'm saying sounds like a non sequitur.</div><div><br></div><div>I'll try to explain:<br></div><div>- I have a repository with a large source tree that contains hundreds of leaf directories.</div><div>
<div>- Each leaf directory contains source that needs to be built into a shared library or an executable binary.</div>

- The source tree contains a superset of the functionality that is needed by all configurations.</div>- Any particular configuration of the CMake project will result in only a subset of the libraries and/or binaries being built.<br><div>- The subset being built is defined via CMake option() commands that set (or don't) cache variables that control which subdirectories are added to the CMake project.<br></div><div><br></div><div>What I want from Eclipse:<br></div><div>- Only show in the project tree and Open Resource dialog the subset of source files that belong to the current configuration of the CMake project, so that developers don't get confused about what is relevant or not to the configuration of CMake they are working in.</div><div>- Only index the subset of source files that belong to the current configuration of the CMake project, so that resources are not wasted indexing irrelevant sources, and so that developers are not flooded with irrelevant indexer errors.<br></div>- Show header files that are assigned to a target, including custom header-only targets ("custom_target(... SOURCES)"), as is done by other IDEs.<br><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If the IDE indexing all source files takes too long, I would say it is a <br>
problem with the IDE; but not a problem of cmake's IDE project generator (as <br>
the topic states).<br></blockquote><div><br></div><div>Time is only one aspect (see above), although it's particularly bad with the out-of-box Eclipse project generated by CMake's default settings because it indexes every source file 3 times.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">That's the only way to go in your case. How should the CDT4 project generator <br>
know about all your source files that do not take part in a build?<br></blockquote><div><br></div><div>The point I'm trying to make is that I *don't* want Eclipse to know about source files that are *not* being built, but it *does* know about them because all solutions (CMake generator, cmake4eclipse) just point Eclipse at the source tree *in the filesystem*, and not at the conceptual project tree defined via the CMakeLists.txt hierarchy. Remember that for me, the filesystem contains lots of sources that are *not* relevant to any one CMake configuration that developers will be working with.<br></div></div></div>
</div></div></div>