Fortran 2008 [1] adds support for a new syntax related to modules:
submodule ( ParentModule ) SubModule
submodule ( ParentModule : SubModule ) NestedSubModule
Both of these mean that the current source file requires the module
`ParentModule` to be available if it is not provided in the current
file. Teach our Fortran dependency scanner to parse this syntax to
extract this relationship. For now simply tolerate the nested submodule
case and extract only the dependency it expresses on the main module.
Further work will be needed to extract dependencies among nested
submodules.
[1] http://fortranwiki.org/fortran/show/Fortran+2008Closes: #16234
Fortran allows the syntax
MODULE PROCEDURE ...
MODULE FUNCTION ...
MODULE SUBROUTINE ...
to declare procedures/functions/subroutines that are members of modules.
Do not treat such syntax as the definition of a module with one of these
names.
Issue: #16234
d0be1e15 Add directory properties to get source and binary directories
cbca6582 Add directory property to list buildsystem targets
7a4b8d0d Add a directory property to list subdirectories
089868a2 cmState: Record buildsystem target names in each directory
6429d6d9 cmOutputConverter: Remove now-obsolete Convert method
ad790617 Convert: Inline uses of START_OUTPUT
4cf707b0 Convert: Remove HOME_OUTPUT enum value
3d12ffbf Ninja: Update comment variable reference
4d69ac76 Convert: Move access to BinaryDirectory out of loops
e7c89567 Convert: Inline uses of HOME_OUTPUT
dc510919 Common: Use a string instead of enum for WorkingDirectory
76833149 Convert: Simplify switch
dc95020e Convert: Remove obsolete MAKERULE enum value
1825f876 Convert: Move access to BinaryDirectory out of loops
25c39ac2 Convert: Inline HOME_OUTPUT MAKERULE conversion
516e79ba Convert: Inline MAKERULE conversions
e13e519e Convert: Move access to BinaryDirectory out of loops
34c6e995 Convert: Avoid HOME_OUTPUT enum when converting to relative paths
839c65bc Convert: Move access to CurrentBinaryDirectory out of loops
21b5fdf9 Convert: Avoid START_OUTPUT enum when converting to relative paths
...
Allow for experimental cmProtocolVersions, which will only ever get
listed if the server was started with the (undocumented)
"--experimental" flag.
Mark current protocol version 1.0 as experimental.
The enums just introduce unfamiliar names and don't provide value.
The order of arguments is reversed, as that is the result of the
cmOutputConverter::ConvertToRelativePath
overload which accepts the RelativeRoot enum.
Add SOURCE_DIR and BINARY_DIR directory properties that return the
absolute paths to the corresponding directories. These correspond
to the target properties of the same names that we already have.
Maintain in the directory state the list of target names added to be
built. These are normal, non-imported targets (but do include INTERFACE
libraries).
Enable the initial handshake of the client to complete the connection
to the server.
The handshake sets the protocol version that client and server will
use to talk to each other. The only way to change this is to quit the
server and start over.
CMake specific information is also set during the initial handshake.
Since cmake so far never had to change basic information about any project
while running, it was decided to keep this information static and
require a restart of the cmake server to change any of these.