[CMake] Querying targets for Fortran module files & module file installation advice

Zaak Beekman zbeekman at gmail.com
Wed Apr 3 12:16:09 EDT 2019


Awesome, thanks!
On Wed, Apr 3, 2019 at 10:26 AM Brad King <brad.king at kitware.com> wrote:

> On 4/3/19 10:09 AM, Zaak Beekman wrote:
> > They contain the mod files. I didn't ask for a $<config> directory to
> > be created for me within the CMAKE_Fortran_MODULE_DIRECTORY but it's
> > there, and all the .mod files are inside it, so `install(DIRECTORY
> > ...)` is incapable (at least in my testing) of fetching them out of
> > the $<config> subdirectory.
>
> The VS generator supports multiple separate configurations being
> built under the same build tree, so all artifacts such as object
> files, libraries, executables, and Fortran modules need to have
> a per-config location.
>
> For libraries and executables we already have ways for projects
> to specify per-config locations such that no per-config
> subdirectory is added.  I've opened an issue to do the same for
> Fortran modules:
>
>   https://gitlab.kitware.com/cmake/cmake/issues/19126
>
> Meanwhile you may be able to use `$<CONFIG>` in the source directory
> specified by `install(DIRECTORY)` when CMAKE_GENERATOR is a
> Visual Studio generator.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190403/f746834d/attachment.html>


More information about the CMake mailing list