Jed Brown wrote:
> There is still the issue that module files don't get rebuild if they are
> deleted,
> 
> make[2]: *** No rule to make target `include/petscmat.mod', needed by 
> `CMakeFiles/petscdm.dir/src/dm/f90-mod/petscdmmod.F.o'.  Stop.
> make[1]: *** [CMakeFiles/petscdm.dir/all] Error 2
> 
> I don't seem to be able to regenerate the module by any lightweight
> procedure (make -B SpecificTarget works).

You can delete the object file the provides the module.

> Perhaps that scenario where
> module files are deleted independent of the object/libraries is
> artificial, but it's not really correct for the build to break if they
> are deleted.

The problem is that the build system doesn't actually point directly
at the .mod files so it doesn't know when they are missing.  I don't
remember all details off the top of my head, but there are very good
reasons that the build system doesn't see .mod files directly.

Fixing this would require some kind of side-effect map.  At the start
of each build the object file providing a missing module would need
to be deleted.  We already have something similar for custom commands
with multiple outputs, but a major distinction is that CMake knows
what files are paired together at generation time.  Object->module
mapping is not known until build time (during dependency scanning).

I have no time to look at this, but I can get you started if you want
to try it yourself.

-Brad
_______________________________________________
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

Reply via email to