Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Tests / RunCMake / CheckSourceRuns / CheckSourceRunsFortran.cmake
1
2
3 enable_language (Fortran)
4 include(CheckSourceRuns)
5
6 set(Fortran 1) # test that this is tolerated
7
8 check_source_runs(Fortran [=[
9       PROGRAM TEST_HAVE_PRINT
10         PRINT *, 'Hello'
11       END
12 ]=] SHOULD_BUILD)
13
14 if(NOT SHOULD_BUILD)
15   message(SEND_ERROR "Test fail for valid Fortran source.")
16 endif()