diff options
Diffstat (limited to 'Modules/CMakeTestFortranCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestFortranCompiler.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index 4937d20..677cb77 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -5,10 +5,11 @@ # any makefiles or projects. IF(NOT CMAKE_FORTRAN_COMPILER_WORKS) MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_FORTRAN_COMPILER}") - FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f - "\tPROGRAM TESTFORTRAN\n" - "\tPRINT *, 'Hello'\n" - "\tEND\n") + FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f " + PROGRAM TESTFORTRAN + PRINT *, 'Hello' + END + ") TRY_COMPILE(CMAKE_FORTRAN_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/CMakeTmp/testFortranCompiler.f OUTPUT_VARIABLE OUTPUT) |