From e3d511fb9ca895bcf5aa74640e4a5df640bf9503 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 18 Sep 2023 20:12:14 -0400 Subject: Tests/FortranModules: also test INTERFACE targets with Fortran sources --- Tests/FortranModules/CMakeLists.txt | 1 + Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt | 5 +++++ Tests/FortranModules/Issue25252-iface-target/iface.f90 | 5 +++++ Tests/FortranModules/Issue25252-iface-target/lib.f90 | 11 +++++++++++ 4 files changed, 22 insertions(+) create mode 100644 Tests/FortranModules/Issue25252-iface-target/CMakeLists.txt create mode 100644 Tests/FortranModules/Issue25252-iface-target/iface.f90 create mode 100644 Tests/FortranModules/Issue25252-iface-target/lib.f90 diff --git a/Tests/FortranModules/CMakeLists.txt b/Tests/FortranModules/CMakeLists.txt index 8ebd9b2..895c14c 100644 --- a/Tests/FortranModules/CMakeLists.txt +++ b/Tests/FortranModules/CMakeLists.txt @@ -131,4 +131,5 @@ add_subdirectory(Issue25223) if( # Intel Fortran VS Integration breaks on custom targets with Fortran sources NOT CMAKE_GENERATOR MATCHES "Visual Studio") add_subdirectory(Issue25252) + add_subdirectory(Issue25252-iface-target) endif() 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 -- cgit v0.12