[CMake] Patch for working with the NAG Fortran compiler

Arjen Markus Arjen.Markus at deltares.nl
Mon Jun 6 15:23:31 EDT 2016


Hello,



I have been using the NAG Fortran compiler under Windows for the PLplot project (http://plplot.sf.net) and I found that I needed a small patch to have shared libraries (DLLs) built with it. I added a file "Windows-NAG-Fortran.cmake" to the Modules/Platform directory (CMake 3.4.3) that I derived from similar files for the NAG compiler for Linux and OSX. It looks like this:





set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.



set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-Wl,-shared")

set(CMAKE_Fortran_CREATE_SHARED_LIBRARY

  "<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -Wl,-o,<TARGET> <SONAME_FLAG><TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")




Nothing fanciful, but it definitely helps to get DLLs built with NAG Fortran and the accompanying C compiler.

Kind regards,

Arjen Markus

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: <http://public.kitware.com/pipermail/cmake/attachments/20160606/08d9c6e5/attachment.html>


More information about the CMake mailing list