bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cmake support


From: Kamil Dudka
Subject: Re: cmake support
Date: Sun, 06 Jan 2019 10:38:02 +0100

On Sunday, January 6, 2019 3:22:01 AM CET Andrew Pennebaker wrote:
> Ach, I've made a career out of not having to know autotools! ./configure &&
> make && [sudo] make install were black boxes as far as I was concerned.
> 
> So be it, I'll spend some time reading up this weekend and see how far I
> get. MSVC integration will become more interesting, but I suppose I can
> disable Gnulib for targets that don't actually need it. This is what I get
> for dipping my toes in CloudABI and introducing dprintf(), openat() to my
> projects :P
> 
> Would be nice to offer NetBSD-style packages for MINIX and SmartOS, in
> order to make Gnulib easier to install to a standard include path like with
> other development libraries.

I am afraid that there is no OS distribution that would install Gnulib to
a standard include (and library) path and this is most likely not going to
change because gnulib's developers do not want gnulib to be used this way:

https://www.gnu.org/software/gnulib/manual/html_node/Library-vs-Reusable-Code.html#Library-vs-Reusable-Code

Kamil

> On Sat, Jan 5, 2019 at 12:31 PM Kamil Dudka <address@hidden> wrote:
> > On Saturday, January 5, 2019 6:53:06 PM CET Bruno Haible wrote:
> > > Hi,
> > > 
> > > Andrew Pennebaker wrote:
> > > > Could we improve how gnulib integrates with downstream projects, to
> > 
> > make
> > 
> > > > it
> > > > easier to work with different build tools? In particular, would be
> > 
> > helpful
> > 
> > > > for gnulib to easily work with cmake projects.
> > > > 
> > > > In my case, I have an application that needs openat(), and I already
> > 
> > have
> > 
> > > > a
> > > > complex cmake configuration that would be difficult to rewrite in
> > 
> > terms of
> > 
> > > > autotools.
> > > 
> > > I don't think we will spend time to make gnulib-tool generate cmake
> > > configurations.
> > > 
> > >   1. Because the GNU build system is based on Autotools.
> > >   2. Because many people say that cmake is a horror to use. [1][2]
> > 
> > That is not an argument.  You can find similar horror stories about
> > 
> > autotools:
> >     http://voices.canonical.com/jussi.pakkanen/2011/09/13/autotools/
> > > 
> > > But gnulib-tool by design creates a subdirectory, and you can yourself
> > > 
> > >   - add a simple configure.ac to that subdirectory, as outlined in the
> > >   
> > >     documentation [3],
> > 
> > When I needed it 10 years ago, I was able to get around this limitation by
> > using the --create-testdir option of gnulib-tool.  It created a directory
> > with configure script that (after running make) produced a static library.
> > I am not sure if this approach had any side effects, like turning on debug
> > build, but I was at least not forced to create configure.ac etc.
> > 
> > Kamil
> > 
> > >   - integrate this subdirectory with cmake through an 'ExternalProject'
> > 
> > [4].
> > 
> > > If, during this process, you encounter pain points that require (small)
> > > gnulib-tool changes, please come back to us and report them.
> > > 
> > > Bruno
> > > 
> > > [1]
> > 
> > https://www.reddit.com/r/cpp/comments/4flb8z/fighting_through_a_cmake_hell
> > /
> > 
> > > [2]
> > > https://www.reddit.com/r/cpp/comments/7yps20/its_time_to_do_cmake_right/
> > > [3]
> > > https://www.gnu.org/software/gnulib/manual/html_node/Initial-import.html
> > > [4]
> > 
> > https://stackoverflow.com/questions/5971921/building-a-library-using-autot
> > o
> > 
> > > ols-from-cmake





reply via email to

[Prev in Thread] Current Thread [Next in Thread]