[CLN-list] CMake build patches

Alexey Sheplyakov asheplyakov at yandex.ru
Mon Dec 28 07:40:12 CET 2020


Hello!

28.12.2020, 07:03, "Bruno Haible" <bruno at clisp.org>:

I propose to merge CMake build branch [1] into CLN

[1] https://github.com/asheplyakov/cln/tree/cmake

I've been using it to build CLN and GiNaC for a long time (since 2010 or so) both
for Linux and Windows (MinGW).

> It seems that using a CMake 'ExternalProject' would allow you to use CLN's
> configure-based build system from CMake [1]. No?

ExternalProject does *not* provide any integration. One has to manually
define lots of preprocessor, compiler, linker flags both for ExternalProject itself
and the code which uses it. With CMake all of these is a matter of

target_link_library(myprogram PRIVATE cln::cln)

This becomes very tedious if the program needs several external projects.

> It is usually a waste of time to maintain two build systems (for CLN, in this
> case) in parallel, when one is sufficient.

I disagree. Firstly I don't think autotools based build is sufficient:
a) Generating a correct configure script is rather nontrivial (sort of plug and pray)
b) No integration with IDEs
c) Building on Windows is a pain

Secondly *maintaining* two build systems is not that bad.
Especially when it's someone else (for instance me) who does the maintenance.

Best regards,
     Alexey


More information about the CLN-list mailing list