[cmake-developers] Fortran module dependencies and preprocessing in CMake 3.3.0-rc3

Radovan Bast radovan.bast at gmail.com
Mon Jul 6 09:13:38 EDT 2015


dear Brad,

SOMEDEF is defined at compile time. Attached is a tarball that contains
the CMakeLists.txt which defines SOMEDEF, a main.F90 and a mymodule.F90
which contains the module which is not built prior to building main.F90.

In principle the problem can be reproduced like this:
```
tar xvzf example.tar.gz
cd example/
mkdir build
cd build/
cmake ..
make
```

Thank you for looking into this!

Best wishes,
  radovan



On Mon, Jul 6, 2015 at 3:02 PM Brad King <brad.king at kitware.com> wrote:

> On 07/02/2015 06:25 PM, Radovan Bast wrote:
> > I can consistently reproduce it locally on 3 different machines (Ubuntu
> 14.04
> > and Arch derivative; gfortran 4.8.4 and 5.1.0).
> >
> > I have Git bisected the history and this is the commit that broke this
> > example on my machines:
> >
> https://github.com/Kitware/CMake/commit/0b945ea9a6a38d1b3ee27cc32afb4268bd571600
>
> Thanks for bisecting!
>
> > Can you see something possibly related in there?
>
> That change may have accidentally affected the preprocessor definitions
> sent to the Fortran compiler.  The error message you're seeing is actually
> coming from the compiler trying to use the module, so SOMEDEF must be
> getting defined.  However, without seeing your CMake code I cannot
> determine how.
>
> Can you provide a minimal source tarball that exhibits the problem?
>
> Thanks,
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150706/3b9b27d3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.tar.gz
Type: application/gzip
Size: 496 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150706/3b9b27d3/attachment.bin>


More information about the cmake-developers mailing list