summaryrefslogtreecommitdiffstats
path: root/Tests/FortranModules/Submodules/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-19 13:21:58 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-20 14:57:31 (GMT)
commit402735314ec7fe48ec21e5f4c5b19b6f17682c54 (patch)
tree6ad7b1ccfa99d27779cabaa23095bded497a6cfd /Tests/FortranModules/Submodules/CMakeLists.txt
parent62538b2c4c70eeef52886092e24c97a9a7699a00 (diff)
downloadCMake-402735314ec7fe48ec21e5f4c5b19b6f17682c54.zip
CMake-402735314ec7fe48ec21e5f4c5b19b6f17682c54.tar.gz
CMake-402735314ec7fe48ec21e5f4c5b19b6f17682c54.tar.bz2
Fortran: Add support for submodule dependencies
Since commit v3.7.0-rc1~73^2~1 (Fortran: Add support for submodule syntax in dependency scanning, 2016-09-05) we support parsing Fortran sources that use submodule syntax, but it left addition of `.smod` dependencies to future work. Add it now. The syntax submodule (module_name) submodule_name means the current source requires `module_name.mod` and provides `module_name@submodule_name.smod`. The syntax submodule (module_name:submodule_name) nested_submodule_name means the current source requires `module_name@submodule_name.smod` provides `module_name@nested_submodule_name.smod`. Fixes: #17017
Diffstat (limited to 'Tests/FortranModules/Submodules/CMakeLists.txt')
-rw-r--r--Tests/FortranModules/Submodules/CMakeLists.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/Tests/FortranModules/Submodules/CMakeLists.txt b/Tests/FortranModules/Submodules/CMakeLists.txt
index bf0152f..da204d0 100644
--- a/Tests/FortranModules/Submodules/CMakeLists.txt
+++ b/Tests/FortranModules/Submodules/CMakeLists.txt
@@ -1 +1,20 @@
-add_executable(submod main.f90 provide.f90)
+# The program units in this file consist of a module/submodule
+# tree represented by the following graph:
+#
+# parent
+# |
+# / \
+# / \
+# child sibling
+# |
+# grandchild
+#
+# where the parent node is a module and all other nodes are submodules.
+
+add_executable(submod
+ main.f90
+ parent.f90
+ child.f90
+ grandchild.f90
+ sibling.f90
+ )