summaryrefslogtreecommitdiffstats
path: root/Tests/FortranModules/Issue25252-iface-target
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-09-19 00:12:14 (GMT)
committerBrad King <brad.king@kitware.com>2023-09-20 13:16:59 (GMT)
commite3d511fb9ca895bcf5aa74640e4a5df640bf9503 (patch)
tree7de57d94037e6f001872acdfe471a2945a7ac647 /Tests/FortranModules/Issue25252-iface-target
parent978b68d3bbb44e3bc6adbe5109eb8295f8232ce6 (diff)
downloadCMake-e3d511fb9ca895bcf5aa74640e4a5df640bf9503.zip
CMake-e3d511fb9ca895bcf5aa74640e4a5df640bf9503.tar.gz
CMake-e3d511fb9ca895bcf5aa74640e4a5df640bf9503.tar.bz2
Tests/FortranModules: also test INTERFACE targets with Fortran sources
Diffstat (limited to 'Tests/FortranModules/Issue25252-iface-target')
-rw-r--r--Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt5
-rw-r--r--Tests/FortranModules/Issue25252-iface-target/iface.f905
-rw-r--r--Tests/FortranModules/Issue25252-iface-target/lib.f9011
3 files changed, 21 insertions, 0 deletions
diff --git a/Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt b/Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt
new file mode 100644
index 0000000..b312fcd
--- /dev/null
+++ b/Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_library(fortran_source_iface INTERFACE
+ iface.f90)
+
+add_library(lib25252-iface-target lib.f90)
+add_dependencies(lib25252-iface-target fortran_source_iface)
diff --git a/Tests/FortranModules/Issue25252-iface-target/iface.f90 b/Tests/FortranModules/Issue25252-iface-target/iface.f90
new file mode 100644
index 0000000..0528d41
--- /dev/null
+++ b/Tests/FortranModules/Issue25252-iface-target/iface.f90
@@ -0,0 +1,5 @@
+program main
+
+implicit none
+
+end program
diff --git a/Tests/FortranModules/Issue25252-iface-target/lib.f90 b/Tests/FortranModules/Issue25252-iface-target/lib.f90
new file mode 100644
index 0000000..a6d7fa6
--- /dev/null
+++ b/Tests/FortranModules/Issue25252-iface-target/lib.f90
@@ -0,0 +1,11 @@
+module lib
+
+implicit none
+
+contains
+
+pure real function func()
+func = 1.0
+end function
+
+end module