[cmake-commits] king committed CMakeDetermineCompilerId.cmake 1.5 1.6 CMakeDetermineFortranCompiler.cmake 1.16 1.17

cmake-commits at cmake.org cmake-commits at cmake.org
Fri May 18 09:08:51 EDT 2007


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv24018

Modified Files:
	CMakeDetermineCompilerId.cmake 
	CMakeDetermineFortranCompiler.cmake 
Log Message:
BUG: If the Fortran CompilerId source fails to compile it should not be a failure.  It is only expected to work for Fortran90 compilers.


Index: CMakeDetermineFortranCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineFortranCompiler.cmake,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CMakeDetermineFortranCompiler.cmake	17 May 2007 17:20:43 -0000	1.16
+++ CMakeDetermineFortranCompiler.cmake	18 May 2007 13:08:49 -0000	1.17
@@ -81,6 +81,7 @@
 
   # Try to identify the compiler.
   SET(CMAKE_Fortran_COMPILER_ID)
+  SET(CMAKE_Fortran_COMPILER_ID_ALLOW_FAIL 1)
   INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
   CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS ${CMAKE_ROOT}/Modules/CMakeFortranCompilerId.F90)
 

Index: CMakeDetermineCompilerId.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCompilerId.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CMakeDetermineCompilerId.cmake	17 May 2007 14:07:51 -0000	1.5
+++ CMakeDetermineCompilerId.cmake	18 May 2007 13:08:49 -0000	1.6
@@ -53,10 +53,12 @@
       "${CMAKE_${lang}_COMPILER_ID_SRC}\" failed with the following output:\n"
       "${CMAKE_${lang}_COMPILER_ID_RESULT}\n"
       "${CMAKE_${lang}_COMPILER_ID_OUTPUT}\n\n")
-    MESSAGE(FATAL_ERROR "Compiling the ${lang} compiler identification source file \""
-      "${CMAKE_${lang}_COMPILER_ID_SRC}\" failed with the following output:\n"
-      "${CMAKE_${lang}_COMPILER_ID_RESULT}\n"
-      "${CMAKE_${lang}_COMPILER_ID_OUTPUT}\n\n")
+    IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
+      MESSAGE(FATAL_ERROR "Compiling the ${lang} compiler identification source file \""
+        "${CMAKE_${lang}_COMPILER_ID_SRC}\" failed with the following output:\n"
+        "${CMAKE_${lang}_COMPILER_ID_RESULT}\n"
+        "${CMAKE_${lang}_COMPILER_ID_OUTPUT}\n\n")
+    ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
   ELSE(CMAKE_${lang}_COMPILER_ID_RESULT)
     # Compilation succeeded.
     FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log



More information about the Cmake-commits mailing list