Dear Richard,
 
28.12.2020, 17:39, "Richard B. Kreckel" <kreckel@in.terlu.de>:
> I recall that I tried your CMake patches for CLN twice and ran into some
> issues, see [1].
 
> Why introduce src/cl_config.h in addition to include/cln/config.h?
 
Because include/cln/config.h is a public header, and we don't want to pollute it
with PACKAGE, VERSION, HAVE_FOO and other autotools defined macros (otherwise
any code using CLN and autotools would fail to build).
 
Autotools build does the same thing, the only difference is that the cl_config.h
resides in the `autoconf' directory.
 
> There should be only one location for this stuff.
 
It would be nice, but for now it's difficult. For one include/cln/types.h needs
some macros computed by configure (or CMake) to define sintD, sintE, sintC,
sintP, etc.
 
> Unfortunately, I'm getting build errors when building CLN with autotools
> and with CMake in an alternating way due to multiple definitions of
> GMP_DEMANDS_UINTD_LONG etc.
 
I've checked both type builds like this:
 
autoreconf -i
mkdir _build_autotools && cd _build_autotools && ../configure --disable-static && cd ..
mkdir _build_cmake && cd _build_cmake && cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && cd ..
make -j4 -C _build_autotools &
cmake --build _build_cmake &
 
Both builds run concurrently and have completed just fine. Hence the question:
could you please explain what exactly are you doing?
 
Best regards,
      Alexey