On 6. May, 2010, at 14:52 , Jed Brown wrote: > On Thu, 06 May 2010 08:28:34 -0400, Bill Hoffman <bill.hoff...@kitware.com> > wrote: >> The problem with fortran 90, is that you have to find out the depends to >> figure out the order in which files are built. It has a system where >> "include like" files are generated by the compiler. So, if you have: >> >> a.f90 -> produces a.mod >> b.f90 -> uses a.mod >> >> If you compile b before a, then it fails to compile. To solve this >> CMake's dependency code parses all the f90 files in a target first, then >> creates depend information so that b.f90 will depend on a.f90. I >> suppose this part could be pushed to the generator time for the tup >> generator. It might make for a slow generate step in the CMake process. > > Good point. Once the *.mod files exist, tup will know about the > dependency (because the compiler looks at the *.mod file), but it > wouldn't know about it a priori (unless CMake told it, but make has the > same issue---worse due to no internal dependency knowledge).
Looks like the Fortran 90 issue can be solved with "order-only" inputs: a.f90 |> gfortran -c -o %o %f |> %f.o b.f90 | a.f90 |> gfortran -c -o %o %f |> %f.o The last line tells tup that b.f90 depends on a.f90, which is something that the Fortran 90 dependency parser handles. Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake