Thank you Morten for your reply.
Can't you manage all that just with dependencies as it's done in C/C++, too? I mean: If you setup the module as external dependency through the project's (targets) option, then if the module has changed the main project will automatically be re-linked, re-compiled (if needed).
Yes, I think, I could solve dependency problems by using targets. This solution will ensure right order of compilation and that all dependent files is updated. But I am unsure if it is best solution from user's point of view, because instead of, say, two targets (debug, release) he will see additional, say, 20 (depending on how many files with modules are) automatically generated targets. And I am unsure if I could manage to make up-to-date these targets when the user change something.
Can you provide a sample so that I can better understand?
I don't know what kind of sample do you like? Code sample? I will try to explain how Fortran'90 works.
For example, we have two files in a project: one file with main function a_main.f90 and second file b_file.f90. In second file b_file.f90 is declared module b_file_module. a_main.f90 uses this module. When compiler is asked to compile b_file.f90, it generates not only b_file.o file, but additionally b_file_module.mod file. This *.mod file is like *.h file in c++. If we change something in b_file.f90, then b_file.f90 will be re-compiled and new b_file_module.mod file will be generated. Because a_main.f90 uses this mod file, a_main.f90 has to be recompiled too.