diff options
Diffstat (limited to 'Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake')
-rw-r--r-- | Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake new file mode 100644 index 0000000..1d4e16d --- /dev/null +++ b/Tests/RunCMake/CheckSourceCompiles/CheckFortranSourceCompiles.cmake @@ -0,0 +1,14 @@ + + +enable_language (Fortran) +include(CheckSourceCompiles) + +check_source_compiles(Fortran [=[ + PROGRAM TEST_HAVE_PRINT + PRINT *, 'Hello' + END +]=] SHOULD_BUILD) + +if(NOT SHOULD_BUILD) + message(SEND_ERROR "Test fail for valid Fortran source.") +endif() |