[CLN-list] CMakeLists.txt: Improving GiNaC/CLN (& ease of) integration?

Alexey Sheplyakov asheplyakov at yandex.ru
Mon Dec 28 06:58:15 CET 2020


Hello,

28.12.2020, 03:33, Xunie <cln-list at ginac.de>:

> I'm trying to integrate GiNaC into my CMake-based project and I'm having some difficulty setting up the build.

You could try https://github.com/asheplyakov/cln/tree/cmake
In order to compile both CLN and GiNaC just put cln sources into
ginac directory, and run CMake build. For instance

git clone git://www.ginac.de/ginac.git
cd ginac
git clone -b cmake git://github.com/asheplyakov/cln.git
mkdir _build
cd _build
cmake ..
cmake --build .

This will build both CLN and GiNaC

Similarly one can include both GiNaC and CLN sources into  another project,
and basically add_subdirectory(ginac)

Here is a complete example: https://www.ginac.de/git/?p=ginac.git;a=blob_plain;f=doc/examples/CMakeLists.txt;hb=c1083aea35fbc2c75baeec1286818f9c73a1f037

> My questions:
> #1: How do you build GiNaC/CLN when working on your own projects? Am I the only one that uses CMake?

I use CMake to build both CLN and GiNaC

> #2: Could we make the CMake build system (and the integration of GiNaC) slightly easier to work with?
> From a quick glance, CLN and GiNaC seem tightly interwoven.
> Am I correct in assuming there's a reason CLN doesn't have a CMakeLists.txt?

As far as I understand there's no technical reasons.

> Or is this mainly historical and can I safely start adding a CMake build?

I think it's better to reuse the existing one.

Best regards,
      Alexey



More information about the CLN-list mailing list