Help: better summary and xrefs for CMakeAddFortranSubdirectory

This commit is contained in:
Joachim Wuttke (h)
2018-11-11 22:57:13 +01:00
parent 206ce3c0ba
commit b93b3b5500
+6 -6
View File
@@ -5,18 +5,18 @@
CMakeAddFortranSubdirectory CMakeAddFortranSubdirectory
--------------------------- ---------------------------
Use MinGW gfortran from VS if a fortran compiler is not found. Add a fortran-only subdirectory, find a fortran compiler, and build.
The 'add_fortran_subdirectory' function adds a subdirectory to a The ``cmake_add_fortran_subdirectory`` function adds a subdirectory
project that contains a fortran only sub-project. The module will to a project that contains a fortran-only subproject. The module will
check the current compiler and see if it can support fortran. If no check the current compiler and see if it can support fortran. If no
fortran compiler is found and the compiler is MSVC, then this module fortran compiler is found and the compiler is MSVC, then this module
will find the MinGW gfortran. It will then use an external project to will find the MinGW gfortran. It will then use an external project to
build with the MinGW tools. It will also create imported targets for build with the MinGW tools. It will also create imported targets for
the libraries created. This will only work if the fortran code is the libraries created. This will only work if the fortran code is
built into a dll, so BUILD_SHARED_LIBS is turned on in the project. built into a dll, so :variable:`BUILD_SHARED_LIBS` is turned on in
In addition the CMAKE_GNUtoMS option is set to on, so that the MS .lib the project. In addition the :variable:`CMAKE_GNUtoMS` option is set
files are created. Usage is as follows: to on, so that Microsoft .lib files are created. Usage is as follows:
:: ::