[CMake] actually using cmake alternative to convenience libraries

Magnus Therning magnus at therning.org
Wed Nov 18 09:26:39 EST 2015


On Wed, Nov 18, 2015 at 08:16:39AM -0600, Jack Stalnaker wrote:
> In the real source code, baz is a thin wrapper for the foo/bar lib. It
> combines them into a Python module library, and doesn't really contain
> any substantial code of its own.

Ah, that justifies its location then :)

> As for the last suggestion, I was specifically trying to avoid listing
> the sources in the top level CMakeLists.txt file. To me, that pollutes
> the top-level file with stuff it shouldn't care about. In the likely
> event that I have to change the contents of src or lib, I have to
> change the top-level CMakeLists, which seems non-intuitive.

What about using `include()` to bring the variables into the top-level
(or really any level)?  (Do note I haven't thought that suggestion
through properly!)

> I realize all of this sounds incredibly pedantic, since I've found so
> many workarounds by now, but I guess I'm trying to get to the bottom
> of the CMake crew's vision of how what used to be convenience libs in
> autotools should work in CMake. The idea of smashing together a set of
> common objects and their dependencies into a convenient partially
> compiled/linked block and passing it around without installing it just
> seems so, well, convenient and clean, and I am trying to envision the
> alternative since otherwise cmake seems so convenient and clean
> compared to autotools.

Oh, how I recognize that feeling. :)  Sometimes CMake feels clean and
convenient, and then all of a sudden one has to start thinking about
what's available at which state and frustration grows...  I guess build
systems are a bit like mail readers, they all suck, one just have to
find one that sucks less than the previous one used.

/M

-- 
Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: magnus at therning.org   jabber: magnus at therning.org
twitter: magthe               http://therning.org/magnus

If voting could really change things it would be illegal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151118/7a7fd300/attachment.sig>


More information about the CMake mailing list