check_fortran_source_compiles(<code> <resultVar> [FAIL_REGEX <regex>...] [SRC_EXT <extension>] )
check_fortran_source_compiles(<code> <resultVar> [FAIL_REGEX <regex>...] [SRC_EXT <extension>] )
check_Fortran_source_compiles("${_source}" ${_var} ${_common_patterns})
check_fortran_source_compiles(
"program test
print *, \'Hello, world\'
end program test"
${RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for Fortran" # GNU
${_CheckLinkerFlag_COMMON_PATTERNS})
check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
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)
check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")
CHECK_Fortran_SOURCE_COMPILES(" program main
implicit none
write ( *, '(a)' ) ' Hello, world!'
stop
end" FORTRAN_77_WORKS)
check_fortran_source_compiles("${OpenMP_Fortran_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
check_fortran_source_compiles(
"program test
print *, \'Hello, world\'
end program test"
${RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for Fortran" # GNU
${_CheckLinkerFlag_COMMON_PATTERNS})