[CMake] Fortran 9x dependencies
Warren Turkal
wt at atmos.colostate.edu
Fri Sep 8 14:36:36 EDT 2006
Is there a way to override the mechanism for finding dependencies? Fortran 90
with conditionally compiled modules is not handled correctly. It would be nice
to be able to take the results of cpp -M on a source file and append
additional dependencies found by looking at the preprocessed source. I
know the following example is specific to gfortran, but I think it
would be useful to make my idea more concrete.
(get dependencies from GNU CPP, like #include)
$ cpp -M rsys.F90
rsys.o: rsys.F90
(get the rest of the dependecies)
$ cpp rsyst.F90 | grep -i '^[[:space:]]*use[[:space:]]' | awk '{print $2 ".mod.proxy"}' | tr 'A-Z' 'a-z'
blah.mod.proxy
With that info, I should be able to generate a full list of
dependencies for the Fortran source file.
I am trying to work around the crappy support for preprocessed Fortran
dependency generation. See bug #2361 [1].
wt
[1] http://www.cmake.org/Bug/bug.php?op=show&bugid=2361
--
Warren Turkal, Research Associate III/Systems Administrator
Colorado State University, Dept. of Atmospheric Science
More information about the CMake
mailing list