[cmake-developers] [PATCH] Fix CMAKE_Fortran_PLATFORM_ID on mingw-w64

Melven.Roehrig-Zoellner at dlr.de Melven.Roehrig-Zoellner at dlr.de
Mon Apr 4 05:07:09 EDT 2016


After thinking about my patch I worried it could break other compilers.
So, here is a more defensive version that shouldn't interfere with anything else.

Explanation:
CMAKE_Fortran_COMPILER_ID was correctly set to "GNU";
If CMAKE_Fortran_PLATFORM_IS is missing, run gfortran with a C file
-> fallback to C which has appropriate preprocessor definitions to recognize MINGW.

Regards
Melven

--------------------------
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR) German Aerospace Center Simulation and Software Technology | Linder Hoehe | 51147 Cologne | Germany

Melven Röhrig-Zöllner
Telephone +492203 / 601 - 2574
www.DLR.de



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-CMAKE_Fortran_PLATFORM_ID-e.g.-mingw-w64.patch
Type: application/octet-stream
Size: 1810 bytes
Desc: 0002-Fix-CMAKE_Fortran_PLATFORM_ID-e.g.-mingw-w64.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160404/9ef73feb/attachment.obj>


More information about the cmake-developers mailing list