Re: How to use CMake with cygwin/mingw toolchain?
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 Selkowitzwrote: > 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
Re: How to use CMake with cygwin/mingw toolchain?
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 signature.asc Description: OpenPGP digital signature
Re: How to use CMake with cygwin/mingw toolchain?
Am 20.10.2017 um 14:50 schrieb Peter Quiring: 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. You can just tell cmake to use them: cmake -D CMAKE_C_COMPILER=x86_64-w64-mingw32-gcc But for the full story, you should really read the "cross compiling" chapter of cmake's documentation. -- 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
Re: How to use CMake with cygwin/mingw toolchain?
That's the one indeed - I have no experience with the MinGW distribution under Cygwin though. Perhaps I should try that one too :). Regards, Arjen 2017-10-20 16:25 GMT+02:00 Peter Quiring: > Hi Arjen, > > I'm talking about the mingw that is included with cygwin, not the > standalone version. > I assume you use mingw-w64.org but some of it's packages are too old. > The mingw that is included with cygwin is updated more frequently, but > it lacks a version of cmake. > Try running the cygwin setup.exe and search for "mingw" and you'll see > all the toolchains plus all the precompiled libraries. Very nice. > > >>Hi Peter, >> >>I am not sure I understand all the details, but I have been using >>CMake under Cygwin and MinGW-w64/MSYS2 (I have to be complete here) >>for quite a few years now. Both Cygwin and MinGW-w64/MSYS2 have their >>own versions of CMake, so I use those. >> >>Do you mean to cross-compile? >> >>Regards, >> >>Arjen >> >>2017-10-20 14:50 GMT+02:00 Peter Quiring : >>> What is the current process to use the mingw toolchain that is >>> included with cygwin? >>> >>> There use to be a -mno-cygwin option used with gcc. >>> >>> 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? I also see some Qt5 *.cmake >>> modules included in the Qt5 libraries for mingw. >>> >>> Would it be possible to include a version of cmake built for mingw? >>> >>> Thanks. >>> >>> -- >>> Peter Quiring >>> > > -- > 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 > -- 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
Re: How to use CMake with cygwin/mingw toolchain?
Hi Arjen, I'm talking about the mingw that is included with cygwin, not the standalone version. I assume you use mingw-w64.org but some of it's packages are too old. The mingw that is included with cygwin is updated more frequently, but it lacks a version of cmake. Try running the cygwin setup.exe and search for "mingw" and you'll see all the toolchains plus all the precompiled libraries. Very nice. >Hi Peter, > >I am not sure I understand all the details, but I have been using >CMake under Cygwin and MinGW-w64/MSYS2 (I have to be complete here) >for quite a few years now. Both Cygwin and MinGW-w64/MSYS2 have their >own versions of CMake, so I use those. > >Do you mean to cross-compile? > >Regards, > >Arjen > >2017-10-20 14:50 GMT+02:00 Peter Quiring: >> What is the current process to use the mingw toolchain that is >> included with cygwin? >> >> There use to be a -mno-cygwin option used with gcc. >> >> 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? I also see some Qt5 *.cmake >> modules included in the Qt5 libraries for mingw. >> >> Would it be possible to include a version of cmake built for mingw? >> >> Thanks. >> >> -- >> Peter Quiring >> -- 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
Re: How to use CMake with cygwin/mingw toolchain?
Hi Peter, I am not sure I understand all the details, but I have been using CMake under Cygwin and MinGW-w64/MSYS2 (I have to be complete here) for quite a few years now. Both Cygwin and MinGW-w64/MSYS2 have their own versions of CMake, so I use those. Do you mean to cross-compile? Regards, Arjen 2017-10-20 14:50 GMT+02:00 Peter Quiring: > What is the current process to use the mingw toolchain that is > included with cygwin? > > There use to be a -mno-cygwin option used with gcc. > > 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? I also see some Qt5 *.cmake > modules included in the Qt5 libraries for mingw. > > Would it be possible to include a version of cmake built for mingw? > > Thanks. > > -- > 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 > -- 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