[PATCH ipmi-fru-parser] RFC: use cmake.
Patrick Williams
patrick at stwcx.xyz
Tue Mar 8 13:53:25 AEDT 2016
Joel,
On Mon, Mar 07, 2016 at 02:30:51PM +1030, Joel Stanley wrote:
> On Fri, Mar 4, 2016 at 9:00 AM, OpenBMC Patches
> <openbmc-patches at stwcx.xyz> wrote:
> > From: Patrick Williams <patrick at stwcx.xyz>
> >
> > There was a previous proposal to consider autotools (see
> > openbmc/ipmi-fru-parser#7). This is an alternative implementation
> > using cmake.
>
> I'm not a fan of autotools; I have not chosen to use it on small
> projects in the past.
>
> That said, I have stopped working on projects due to cmake's
> downsides. It's overly complex, and no clear way to implement rules,
> making it hard for newbies and experienced developers alike.
Can you elaborate on this? I honestly don't have much experience with
CMake but from the little I have played with it it seems 5x easier than
makefiles (which autotools still use via Makefile.am).
Compare the gigantic m4 script required to test C++14 support in
autotools vs two lines in CMake:
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED on)
> I would prefer to see autotools implemented by one of our team members
> that has experience with it, and they can help the rest of us maintain
> it.
It isn't just a one-repository thing though. What is going to happen is
that even a well-written autotools is going to get copied and modified
and copied and modified into all the various openbmc repositories.
We're going to need a few autotools experts to keep watch over
everything and avoid hit-by-bus situations.
>
> I noticed in my feeds a new project created by some of the Xorg
> developers that is a nice example of a clean, well structured project
> that uses systemd, dbus, and autotools can be found here:
>
> https://github.com/libratbag/ratbagd
>
That example has a 290 line m4 script, 160 line configure script, and a
100 line makefile just to build an executable out of 6 .c files. Even
if it is "clean" there is way too much to consume here.
The "meat" of the dependency description is in these lines:
PKG_CHECK_MODULES([LIBUDEV], [libudev])
PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd >= 227])
PKG_CHECK_MODULES([LIBRATBAG], [libratbag >= 0.2])
CMake has a similar macro via 'find_package'.
> Cheers,
>
> Joel
>
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160307/00ca2c21/attachment.sig>
More information about the openbmc
mailing list