mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
Test all target types in Fortran
This teaches the Fortran test to try all basic target types (archive, shared lib, exe) with Fortran-only sources.
This commit is contained in:
parent
867a1cc12c
commit
eb3d02e351
@ -7,8 +7,11 @@ message("CMAKE_Fortran_COMPILER_INIT = ${CMAKE_Fortran_COMPILER_INIT}")
|
||||
message("CMAKE_Fortran_COMPILER_FULLPATH = ${CMAKE_Fortran_COMPILER_FULLPATH}")
|
||||
message("CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}")
|
||||
message("CMAKE_Fortran_FLAGS = ${CMAKE_Fortran_FLAGS}")
|
||||
add_executable(testf hello.f)
|
||||
|
||||
add_library(hello STATIC hello.f)
|
||||
add_library(world SHARED world.f)
|
||||
add_executable(testf testf.f)
|
||||
target_link_libraries(testf hello world)
|
||||
|
||||
function(test_fortran_c_interface_module)
|
||||
message(STATUS "Testing FortranCInterface module")
|
||||
|
@ -1,6 +1,6 @@
|
||||
PROGRAM GREETINGS
|
||||
SUBROUTINE HELLO
|
||||
|
||||
PRINT *, 'Real programmers write Fortran!'
|
||||
PRINT *, 'Hello'
|
||||
|
||||
END
|
||||
|
||||
|
7
Tests/Fortran/testf.f
Normal file
7
Tests/Fortran/testf.f
Normal file
@ -0,0 +1,7 @@
|
||||
PROGRAM TESTF
|
||||
|
||||
CALL HELLO()
|
||||
CALL WORLD()
|
||||
|
||||
END
|
||||
|
6
Tests/Fortran/world.f
Normal file
6
Tests/Fortran/world.f
Normal file
@ -0,0 +1,6 @@
|
||||
SUBROUTINE WORLD
|
||||
|
||||
PRINT *, 'World!'
|
||||
|
||||
END
|
||||
|
Loading…
Reference in New Issue
Block a user