CMakeLists.txt 593 B

123456789101112131415
  1. PROJECT(testf Fortran)
  2. SET(CMAKE_VERBOSE_MAKEFILE 1)
  3. MESSAGE("ENV_FLAGS = $ENV{FFLAGS}")
  4. MESSAGE("CMAKE_Fortran_COMPILER_INIT = ${CMAKE_Fortran_COMPILER_INIT}")
  5. MESSAGE("CMAKE_Fortran_COMPILER_FULLPATH = ${CMAKE_Fortran_COMPILER_FULLPATH}")
  6. MESSAGE("CMAKE_Fortran_COMPILER = ${CMAKE_Fortran_COMPILER}")
  7. MESSAGE("CMAKE_Fortran_FLAGS = ${CMAKE_Fortran_FLAGS}")
  8. ADD_EXECUTABLE(testf hello.f)
  9. IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
  10. ADD_EXECUTABLE(test_module
  11. test_module_main.f90
  12. test_module_implementation.f90
  13. test_module_interface.f90)
  14. ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)