|
@@ -21,7 +21,7 @@ unset(CMAKE_Fortran_COMPILER_WORKS CACHE)
|
|
|
# is set and cmake stops processing commands and will not generate
|
|
# is set and cmake stops processing commands and will not generate
|
|
|
# any makefiles or projects.
|
|
# any makefiles or projects.
|
|
|
if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
|
- PrintTestCompilerStatus("Fortran" "")
|
|
|
|
|
|
|
+ PrintTestCompilerStatus("Fortran")
|
|
|
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
|
|
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
|
|
|
PROGRAM TESTFortran
|
|
PROGRAM TESTFortran
|
|
|
PRINT *, 'Hello'
|
|
PRINT *, 'Hello'
|
|
@@ -37,7 +37,7 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
|
- PrintTestCompilerStatus("Fortran" " -- broken")
|
|
|
|
|
|
|
+ PrintTestCompilerResult(CHECK_FAIL "broken")
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
|
"Determining if the Fortran compiler works failed with "
|
|
"Determining if the Fortran compiler works failed with "
|
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
@@ -48,7 +48,7 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
|
|
|
"CMake will not be able to correctly generate this project.")
|
|
"CMake will not be able to correctly generate this project.")
|
|
|
else()
|
|
else()
|
|
|
if(FORTRAN_TEST_WAS_RUN)
|
|
if(FORTRAN_TEST_WAS_RUN)
|
|
|
- PrintTestCompilerStatus("Fortran" " -- works")
|
|
|
|
|
|
|
+ PrintTestCompilerResult(CHECK_PASS "works")
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
|
"Determining if the Fortran compiler works passed with "
|
|
"Determining if the Fortran compiler works passed with "
|
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
@@ -60,7 +60,7 @@ else()
|
|
|
|
|
|
|
|
# Test for Fortran 90 support by using an f90-specific construct.
|
|
# Test for Fortran 90 support by using an f90-specific construct.
|
|
|
if(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
if(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
|
- message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
|
|
|
|
|
|
|
+ message(CHECK_START "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
|
|
|
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
|
|
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
|
|
|
PROGRAM TESTFortran90
|
|
PROGRAM TESTFortran90
|
|
|
integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do
|
|
integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do
|
|
@@ -70,13 +70,13 @@ else()
|
|
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
|
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
|
|
|
OUTPUT_VARIABLE OUTPUT)
|
|
OUTPUT_VARIABLE OUTPUT)
|
|
|
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
|
|
|
- message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
|
|
|
|
|
|
|
+ message(CHECK_PASS "yes")
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
|
|
"Determining if the Fortran compiler supports Fortran 90 passed with "
|
|
"Determining if the Fortran compiler supports Fortran 90 passed with "
|
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
|
set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
|
|
set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
|
|
|
else()
|
|
else()
|
|
|
- message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
|
|
|
|
|
|
|
+ message(CHECK_FAIL "no")
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
|
"Determining if the Fortran compiler supports Fortran 90 failed with "
|
|
"Determining if the Fortran compiler supports Fortran 90 failed with "
|
|
|
"the following output:\n${OUTPUT}\n\n")
|
|
"the following output:\n${OUTPUT}\n\n")
|