[CMake] MinGW-w64/MSYS2 (or Cygwin) and NAG Fortran - how to combine?

Arjen Markus Arjen.Markus at deltares.nl
Wed Feb 14 03:16:36 EST 2018


Hi Brad, Alan,



See below.

> -----Original Message-----
> From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca]
> Sent: Tuesday, February 13, 2018 11:55 PM
>
> In general, you get native packages from the mingw64 repository and POSIX-aware
> packages from the msys2 repository for this dual-natured platform, and cmake is
> one of those rare beasts that has a package in each repo.
>
Yes, I have both - one in $PREFIX/mingw64/bin and one in $PREFIX/usr/bin. The latter is the MSYS2 version.

> @Arjen: to answer Brad's questions you should modify our top-level CMakeLists.txt
> to also report CMAKE_HOST_SYSTEM_NAME (just in case that is not the same
> as CMAKE_SYSTEM_NAME which we already report there).  >


The MinGW version of Cmake reports Windows for both variables and the MSYS2 version reports MSYS.

I set CC and FC to x64cc and nagfor respectively before invoking CMake (either version), so that the proper tools are used. However, the problem is that sometimes the configuration fails, sometimes the build fails. There is very little information about what is going wrong. Or there is a lot I simply fail to find the wanted needle in that haystack.

I have also had a situation where the Freetype library was recognised but the build failed on a bunch of unresolved externals.

Further complication: my trial licence for NAG Fortran ends today :(.

So, the exercise up to now has brought us a nice way to use NAG Fortran in its native environment, but without the benefit of installed packages under MinGW-w64/MSYS2.

The number of combinations to try is also rather big, I am afraid. That would require a lot more trial and error, if no pruning is possible.

Regards,

Arjen

DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180214/bad8bd71/attachment-0001.html>


More information about the CMake mailing list