X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type; q=dns; s=default; b=mZTg6z7
	FZ/w5+X72ZLX6uH6kS7N6w736AdUDLo0KIpS1HN8A4MoO2piEba5hBTlb6k2bJS/
	sgWUpGrgdpr8T5DBcjR8hNAbzmuZpn+haC18/RhwmAq32cQeisUGQkeLcFN/1g8v
	E5x5PQJ4dFsaa265/T3QOmGxssjcMlqyxXRE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:content-type; s=default; bh=eshQkYh5XqCkj
	1vw8anw0FeP+qw=; b=E9bek2AEzicuCgowQlJKyLF6XFIOWGDHykd/HiKlfyqBP
	KE7ktv6pvTPhV30A80S9pBvrRh/BsPm5+MgMj4iYVbx2TMHHwNJ/Ie4ntorW4mFC
	j4quDx0GQNpH0aRMbtgZJZTMU3Vx0i/MR4qmMi51Dzan5ZKSORY2p/gik1NMCM=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=qt5, quiring, Qt5, Quiring
X-HELO: mail-lf0-f45.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:mime-version:in-reply-to:references:from:date         :message-id:subject:to;        bh=3fMx3dEVtPpftLZhds+e57veN165YYNdi8zbct8mUcM=;        b=dnkvM0bHTfHFkyf09HIoCwR+qYxz6sPU4K2MMkSKfVGdBFboHqAclXOWFzvUha+hP6         gz21xSU1dZ+lWZdazwFdBIFoTcj0/VhQzZPpZI9qxNVsDAJzJi5HzDGQCTvqR5odPti4         xlsvpgN+ZWTxAgdqHhQtJ1TOmQIxnIONLYtrRKj3QCzE0Cli7zWILpX6UuzoCdaZ2vVv         dZA+tF3gbkvZlAy2p1hKhwA1hdjaZjCFhXBniAeQeE3OokE9wcoxcWaUAQYlzvF0i7ge         QwXVbYPh34dQnwtUMqv7VQeOf5zkAdYKBPhvWtv2ixO/XQkcJvbqY2ceWK8lvHaRdWs4         RLMg==
X-Gm-Message-State: AMCzsaXpvY1HDHbhR9iHQN9Xxy4qN/op+ZlBiMFwZIAdt0eslTryPzBa	DOwatUgXMY/hDBVH59uoVwO+gwm9cR+ysoaKPsk=
X-Google-Smtp-Source: ABhQp+Tj4DJAGcHErON793wYZVCAQPkoAu6Q52DRtOk5AVRuD5myoK1XS+noCIrCabZO+hmG6LkUG0sJdKn2iwxqksU=
X-Received: by 10.46.69.6 with SMTP id s6mr5597282lja.76.1508761337199; Mon, 23 Oct 2017 05:22:17 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <aaae0288-a012-f49b-dcbb-2b1952622ed5@cygwin.com>
References: <CA+3dX1xvZZLXy9ax5MHeu80N6V8SCORx6wcJGMoUkAvy5pKAkg@mail.gmail.com> <aaae0288-a012-f49b-dcbb-2b1952622ed5@cygwin.com>
From: Peter Quiring <pquiring@gmail.com>
Date: Mon, 23 Oct 2017 08:21:56 -0400
Message-ID: <CA+3dX1zNREOWQaqfq45ZXQicRKckpecg5f_gRTGYKpsYsiNQ6Q@mail.gmail.com>
Subject: Re: How to use CMake with cygwin/mingw toolchain?
To: cygwin@cygwin.com
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes

I also found just setting CC and CXX environment variables pointing to
the mingw gcc works.

Thanks for the links.

On Fri, Oct 20, 2017 at 5:11 PM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
> On 2017-10-20 07:50, Peter Quiring wrote:
>> What is the current process to use the mingw toolchain that is
>> included with cygwin?
>
> Treat it like any other cross-compiling scenario.
>
>> There use to be a -mno-cygwin option used with gcc.
>
> That was an ugly hack which never really worked correctly and which we
> happily rid ourselves years ago.
>
>> The mingw versions have x86_64-w64-mingw32- or i686-w64-mingw32- added
>> to their exe names. Currently I just use these directly but I want to
>> use cmake.
>>
>> Cygwin also includes cmake. How would I configure it to use the mingw
>> toolset that is included with cygwin?
>
> You need to provide a number of options, see:
>
> https://github.com/cygwinports/cygport/blob/master/cygclass/cmake.cygclass#L137
>
>> I also see some Qt5 *.cmake modules included in the Qt5 libraries for mingw.
>
> Those, like all my packages, are built with cygport.
>
>> Would it be possible to include a version of cmake built for mingw?
>
> No, but you can create a CMake toolchain file with all the options so
> that you don't have to specify them each time:
>
> https://cmake.org/Wiki/CMake_Cross_Compiling
>
> --
> Yaakov
>



-- 
Peter Quiring

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

