Tests/FortranModules: also test INTERFACE targets with Fortran sources

This commit is contained in:
Ben Boeckel 2023-09-18 20:12:14 -04:00 committed by Brad King
parent 978b68d3bb
commit e3d511fb9c
4 changed files with 22 additions and 0 deletions

View File

@ -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()

View File

@ -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)

View File

@ -0,0 +1,5 @@
program main
implicit none
end program

View File

@ -0,0 +1,11 @@
module lib
implicit none
contains
pure real function func()
func = 1.0
end function
end module