summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake')
-rw-r--r--Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake b/Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake
new file mode 100644
index 0000000..50e8ec8
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/CheckSourceRunsFortran.cmake
@@ -0,0 +1,16 @@
+
+
+enable_language (Fortran)
+include(CheckSourceRuns)
+
+set(Fortran 1) # test that this is tolerated
+
+check_source_runs(Fortran [=[
+ PROGRAM TEST_HAVE_PRINT
+ PRINT *, 'Hello'
+ END
+]=] SHOULD_BUILD)
+
+if(NOT SHOULD_BUILD)
+ message(SEND_ERROR "Test fail for valid Fortran source.")
+endif()