From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 208.118.235.0/24 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from listsout.gnu.org (listsout.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B19821F6A9 for ; Sat, 5 Jan 2019 18:40:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:45024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfqrr-0000B9-6E for normalperson@yhbt.net; Sat, 05 Jan 2019 13:40:19 -0500 Received: from eggsout.gnu.org ([209.51.188.92]:37680 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfqrl-00007D-CG for bug-gnulib@gnu.org; Sat, 05 Jan 2019 13:40:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfqrg-0005sd-Go for bug-gnulib@gnu.org; Sat, 05 Jan 2019 13:40:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36234) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfqrg-0005rX-BK for bug-gnulib@gnu.org; Sat, 05 Jan 2019 13:40:08 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E3C0C049D79; Sat, 5 Jan 2019 18:31:44 +0000 (UTC) Received: from kdudka-nb.localnet (ovpn-204-50.brq.redhat.com [10.40.204.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BAE2600C0; Sat, 5 Jan 2019 18:31:43 +0000 (UTC) From: Kamil Dudka To: Bruno Haible Subject: Re: cmake support Date: Sat, 05 Jan 2019 19:32:20 +0100 Message-ID: <4708743.mAexus13G1@kdudka-nb> In-Reply-To: <3784148.CO4aUIPAkI@omega> References: <3784148.CO4aUIPAkI@omega> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 05 Jan 2019 18:31:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Pennebaker , bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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-autoto > ols-from-cmake