<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 9:08 AM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1nz" class="a3s" style="overflow:hidden">I would avoid creating these single use, per directory libraries entirely.<br>
<br></div></blockquote><div><br></div><div>Well, creating the static libraries is obviously just an artifact of our current</div><div>build scheme, so it makes sense to ditch it.</div><div><br></div><div>Creating these CMake object libraries doesn't seem bad; is there some</div><div>reason to avoid doing that? A reason for doing it is it gives targets for</div><div>target_include_directories, so just the crypto objects can be built with</div><div>the OpenSSL include directory.</div><div><br></div><div>Also for some reason setting the POSITION_INDEPENDENT_CODE</div><div>property for the top-level shared library (the default anyway) doesn't</div><div>seem to propagate down (and maybe it can't), and the named thing</div><div>makes it easy to apply the property to the sources. Though now I look,</div><div>I could use set_property on the sources (or the directory), and I could</div><div>use set_property similarly to add include directories (and compile</div><div>definitions).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1nz" class="a3s" style="overflow:hidden">
A single target can build sources located in any number of directories.<br>
<br>
If you want to subdivide the source file listing of that one target for organizational purposes you can do so with e.g. include(), target_sources() and/or list variables.</div></blockquote></div><br>Thanks for suggesting that. For some reason it hadn't occurred to me.</div><div class="gmail_extra">I'm not sure whether that would work out better for this particular case</div><div class="gmail_extra">or not, or for the larger library I'd like to do (with ~500 sources in a tree</div><div class="gmail_extra">of ~40 directories).</div><div class="gmail_extra"><br></div><div class="gmail_extra">(I suspect there's not that much in it ultimately and worrying about the</div><div class="gmail_extra">choice is as much bike shedding as anything.)</div><div class="gmail_extra"><br></div></div>