summaryrefslogtreecommitdiffstats
path: root/Tests/Fortran/CMakeLists.txt
blob: c6c6689171b245f08ae5fb5c6ed1c05d42823f97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PROJECT(testf Fortran)
SET(CMAKE_VERBOSE_MAKEFILE 1)
MESSAGE("ENV_FLAGS = $ENV{FFLAGS}")
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)

IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
  ADD_EXECUTABLE(test_module
    test_module_main.f90
    test_module_implementation.f90
    test_module_interface.f90)

  ADD_EXECUTABLE(test_use_in_comment_fixedform
    test_use_in_comment_fixedform.f)
  ADD_EXECUTABLE(test_use_in_comment_freeform 
    test_use_in_comment_freeform.f90)

  ADD_EXECUTABLE(test_in_interface 
    in_interface/main.f90
    in_interface/module.f90)

ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)