I have a (large, old) fortran project for fluid simulations. It can create two executables, for compressible and incompressible flow respectively. Consequently, there are many routines that are named exactly the same between the two. When Doxygen creates the source code browser, it will only link to one of these same-named subroutines. So there's a 50/50 chance that it will link to the wrong subroutine.
Simplified Example:
This is the directory structure of the project currently:
|-Project
| |-common
| | |-main.f
| |-compressible
| | |-solver.f
| |-incompressible
| | |-solver.f
|-CMakeFiles
main.f
:
program main
call solve()
end
incompressible/solver.f
/compressible/solver.f
:
subroutine solve()
...
call support_function()
... [call other subroutines exclusively in its directory or in '../common']
end
subroutine support_function()
...
end
CMake builds the software and will hide directories depending on what executable needs to be created. For example, if the incompressible executable needs to be created, CMake will ignore the compressible
directory.
What Doxygen currently does:
If I'm looking at the source code for either solver.f
and click on a link to go to support_function
, it will go to incompressible/solver.f-->support_function
, regardless of which directory it's in.
Similarly, f I'm looking at the source code for main.f
and click on a link to go to solve()
, it will go to incompressible/solver.f-->solve()
. Ideally, it would give an option as to which one it wanted to go to.
Question/What I want to happen
Is there a way to make Doxygen link to the correct set of subroutines based on which directory the source code is in? Maybe something similar to what CMake does (ignoring specific directories when compiling a specific directory)?
Another thing that would be nice (but probably more difficult if not already implemented) would be when clicking a link to solve()
while in main.f
, have it go to a page that gives an option for whether it should go to incompressible/solver.f-->solve()
or compressible/solver.f-->solve()