diff options
author | Brad King <brad.king@kitware.com> | 2022-11-30 13:55:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-30 13:55:59 (GMT) |
commit | e15d9f51dba1509943d1c40ad65b3ca206ec38db (patch) | |
tree | 3f0fadc713b753a92d75e591155398f40a19b05f /Tests | |
parent | d340fcdbb7c25e51343d3502bf4e971407f74f0d (diff) | |
parent | a67da2ef66883488554fe3647b9e11aeb52c09e6 (diff) | |
download | CMake-e15d9f51dba1509943d1c40ad65b3ca206ec38db.zip CMake-e15d9f51dba1509943d1c40ad65b3ca206ec38db.tar.gz CMake-e15d9f51dba1509943d1c40ad65b3ca206ec38db.tar.bz2 |
Merge topic 'fortran-regression'
a67da2ef66 Tests/FortranModules: add case for modules after "end interface X"
88fb1980c3 Fortran: Restore support for parsing "end interface X"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7966
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FortranModules/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/FortranModules/test_multi_module.f90 | 8 | ||||
-rw-r--r-- | Tests/FortranModules/test_multi_module_main.f90 | 4 |
3 files changed, 22 insertions, 0 deletions
diff --git a/Tests/FortranModules/CMakeLists.txt b/Tests/FortranModules/CMakeLists.txt index 94f5939..5c76132 100644 --- a/Tests/FortranModules/CMakeLists.txt +++ b/Tests/FortranModules/CMakeLists.txt @@ -42,6 +42,16 @@ add_executable(test_module test_module_implementation.f90 test_module_interface.f90) +add_executable(test_multi_module + # Place this first so that we do not get "lucky" and find the module provided + # by compiling `test_multi_module.f90` first. + test_multi_module_main.f90 + test_multi_module.f90) +set_property(TARGET test_multi_module PROPERTY + JOB_POOL_COMPILE multi_module_serial) +set_property(GLOBAL APPEND PROPERTY + JOB_POOLS multi_module_serial=1) + add_executable(test_use_in_comment_fixedform test_use_in_comment_fixedform.f) set_property(SOURCE test_use_in_comment_fixedform.f PROPERTY Fortran_FORMAT FIXED) diff --git a/Tests/FortranModules/test_multi_module.f90 b/Tests/FortranModules/test_multi_module.f90 new file mode 100644 index 0000000..5b28f74 --- /dev/null +++ b/Tests/FortranModules/test_multi_module.f90 @@ -0,0 +1,8 @@ +module first + interface inner + end interface inner +end module first + +module second + REAL :: C = 1 +end module second diff --git a/Tests/FortranModules/test_multi_module_main.f90 b/Tests/FortranModules/test_multi_module_main.f90 new file mode 100644 index 0000000..afd6dff --- /dev/null +++ b/Tests/FortranModules/test_multi_module_main.f90 @@ -0,0 +1,4 @@ +PROGRAM MAINF90 + use second + PRINT *,'Constant is',C +END PROGRAM MAINF90 |