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



Attachment: 0002-Fix-CMAKE_Fortran_PLATFORM_ID-e.g.-mingw-w64.patch
Description: 0002-Fix-CMAKE_Fortran_PLATFORM_ID-e.g.-mingw-w64.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to