[CMake] Dependent variable definitions disappear in fortran module files

John R. Cary cary at txcorp.com
Fri Sep 30 13:15:10 EDT 2011


I have a library that depends on another library (netcdf).

When I build the definitions from the dependency are missing
from the .mod file:

octet.cary$ grep -i nf_inq_varid ezcdf_attrib.mod
octet.cary$

But if I just compile again, they are there:

octet.cary$ /usr/bin/gfortran  -DHAVE_CONFIG_H -fPIC -pipe -O3 
-I/usr/local/contrib/netcdf-4.1.2-ser/include    -c 
/home/research/cary/projects/facetsall/builds/fciowrappers-1.0.48-r124/ezcdf/ezcdf_attrib.f90 
-o CMakeFiles/ezcdf.dir/ezcdf_attrib.f90.o
octet.cary$ grep -i nf_inq_varid ezcdf_attrib.mod403 'nf_inq_varid' 
'ezcdf_attrib' 'nf_inq_varid' 1 ((PROCEDURE404 'nf_inq_varids' 
'ezcdf_attrib' 'nf_inq_varids' 1 ((PROCEDURE'nf_inq_vardimid' 0 402 
'nf_inq_varid' 0 403 'nf_inq_varids' 0 404

So something later in the cmake build seems to be removing
these definitions.

Any idea how to keep them?

Thx.....John Cary


More information about the CMake mailing list