[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.33 1.34 hello.f 1.1 1.2 testf.f NONE 1.1 world.f NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 23 08:24:56 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/Fortran
In directory public:/mounts/ram/cvs-serv18948/Tests/Fortran

Modified Files:
	CMakeLists.txt hello.f 
Added Files:
	testf.f world.f 
Log Message:
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.


--- NEW FILE: testf.f ---
	PROGRAM TESTF

	CALL HELLO()
	CALL WORLD()

	END


Index: hello.f
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Fortran/hello.f,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** hello.f	6 Aug 2004 19:05:00 -0000	1.1
--- hello.f	23 Oct 2009 12:24:43 -0000	1.2
***************
*** 1,5 ****
! 	PROGRAM GREETINGS
  
! 	PRINT *, 'Real programmers write Fortran!'
  
  	END
--- 1,5 ----
! 	SUBROUTINE HELLO
  
! 	PRINT *, 'Hello'
  
  	END

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/Fortran/CMakeLists.txt,v
retrieving revision 1.33
retrieving revision 1.34
diff -C 2 -d -r1.33 -r1.34
*** CMakeLists.txt	5 Oct 2009 20:51:11 -0000	1.33
--- CMakeLists.txt	23 Oct 2009 12:24:41 -0000	1.34
***************
*** 8,13 ****
  message("CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}")
  message("CMAKE_Fortran_FLAGS = ${CMAKE_Fortran_FLAGS}")
- add_executable(testf hello.f)
  
  
  function(test_fortran_c_interface_module)
--- 8,16 ----
  message("CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}")
  message("CMAKE_Fortran_FLAGS = ${CMAKE_Fortran_FLAGS}")
  
+ 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)

--- NEW FILE: world.f ---
	SUBROUTINE WORLD

	PRINT *, 'World!'

	END




More information about the Cmake-commits mailing list