cmake check_fortran_source_compiles examples

Signatures

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

Examples

Amber-MD/cpptraj cmake-cpptraj/CheckLinkerFlag.cmake :44

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})

INET-RC/GeoMX 3rdparty/openmp/runtime/cmake/LibompCheckFortranFlag.cmake :26

check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")

llvm-mirror/openmp runtime/cmake/LibompCheckFortranFlag.cmake :25

check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")

Lewuathe/mlir-hello thirdparty/llvm-project/openmp/runtime/cmake/LibompCheckFortranFlag.cmake :26

check_fortran_source_compiles("${fortran_source}" ${boolean} FAIL_REGEX "${failed_regexes}")

merzlab/QUICK cmake/CheckLinkerFlag.cmake :44

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})