[Cmake-commits] [cmake-commits] king committed CMakeFortranCompiler.cmake.in 1.13 1.14 CMakeTestFortranCompiler.cmake 1.10 1.11
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Jul 30 13:46:53 EDT 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv10098/Modules
Modified Files:
CMakeFortranCompiler.cmake.in CMakeTestFortranCompiler.cmake
Log Message:
Pass Fortran90 test result to try-compile
This stores CMAKE_Fortran_COMPILER_SUPPORTS_F90 in the Fortran compiler
information file CMakeFiles/CMakeFortranCompiler.cmake instead of in
CMakeCache.txt. This file makes the result available to try-compile
projects.
Index: CMakeFortranCompiler.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranCompiler.cmake.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** CMakeFortranCompiler.cmake.in 23 Jul 2009 14:07:18 -0000 1.13
--- CMakeFortranCompiler.cmake.in 30 Jul 2009 17:46:51 -0000 1.14
***************
*** 16,19 ****
--- 16,21 ----
SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
+ SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@)
+
IF(CMAKE_COMPILER_IS_MINGW)
SET(MINGW 1)
Index: CMakeTestFortranCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeTestFortranCompiler.cmake,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** CMakeTestFortranCompiler.cmake 13 Jul 2009 15:24:01 -0000 1.10
--- CMakeTestFortranCompiler.cmake 30 Jul 2009 17:46:51 -0000 1.11
***************
*** 43,46 ****
--- 43,74 ----
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F)
+
+ # Test for Fortran 90 support by using an f90-specific construct.
+ IF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
+ FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
+ PROGRAM TESTFortran90
+ stop = 1 ; do while ( stop .eq. 0 ) ; end do
+ END PROGRAM TESTFortran90
+ ")
+ TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
+ OUTPUT_VARIABLE OUTPUT)
+ IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the Fortran compiler supports Fortran 90 passed with "
+ "the following output:\n${OUTPUT}\n\n")
+ SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
+ ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the Fortran compiler supports Fortran 90 failed with "
+ "the following output:\n${OUTPUT}\n\n")
+ SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0)
+ ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ UNSET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 CACHE)
+ ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+
CONFIGURE_FILE(
${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
***************
*** 50,79 ****
ENDIF(CMAKE_Fortran_COMPILER_FORCED)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
-
- IF(CMAKE_Fortran_COMPILER_WORKS)
- # Test for Fortran 90 support by using an f90-specific construct.
- IF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
- PROGRAM TESTFortran90
- stop = 1 ; do while ( stop .eq. 0 ) ; end do
- END PROGRAM TESTFortran90
- ")
- TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
- OUTPUT_VARIABLE OUTPUT)
- IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran compiler supports Fortran 90 passed with "
- "the following output:\n${OUTPUT}\n\n")
- SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1 CACHE INTERNAL "")
- ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran compiler supports Fortran 90 failed with "
- "the following output:\n${OUTPUT}\n\n")
- SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0 CACHE INTERNAL "")
- ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- ENDIF(CMAKE_Fortran_COMPILER_WORKS)
--- 78,79 ----
More information about the Cmake-commits
mailing list