cmake check_fortran_source_compiles examples

Signatures

check_fortran_source_compiles(<code> <resultVar>
  [FAIL_REGEX <regex>...]
  [SRC_EXT <extension>]
)

Examples

InsightSoftwareConsortium/ITK Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5UseFortran.cmake :80

check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)

ornladios/ADIOS2 cmake/ADIOSFunctions.cmake :215

CHECK_Fortran_SOURCE_COMPILES([[
module foo
  interface bar
    module subroutine bar_integer(x)
      integer, intent(in) :: x
    end subroutine
    module subroutine bar_real(x)
      real, intent(in) :: x
    end subroutine
  end interface
end module
submodule ( foo ) sub
contains
  module subroutine bar_integer(x)
    integer, intent(in) :: x
  end subroutine
  module subroutine bar_real(x)
    real, intent(in) :: x
  end subroutine
end submodule
program main
end program
]] ${var} SRC_EXT F90)

Tencent/Forward source/third_party/hdf5/config/cmake/HDF5UseFortran.cmake :82

check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)

HDFGroup/hdf5 config/HDF5UseFortran.cmake :98

check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)