[cmake-commits] king committed CMakeCInformation.cmake 1.10 1.11 CMakeCXXInformation.cmake 1.13 1.14 CMakeDetermineCCompiler.cmake 1.39 1.40 CMakeDetermineCXXCompiler.cmake 1.34 1.35 CMakeDetermineCompilerId.cmake 1.3 1.4 CMakeDetermineFortranCompiler.cmake 1.14 1.15 CMakeFortranCompiler.cmake.in 1.7 1.8 CMakeFortranCompilerId.F90 1.1 1.2 CMakeFortranInformation.cmake 1.13 1.14

cmake-commits at cmake.org cmake-commits at cmake.org
Thu May 3 08:24:34 EDT 2007


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

Modified Files:
	CMakeCInformation.cmake CMakeCXXInformation.cmake 
	CMakeDetermineCCompiler.cmake CMakeDetermineCXXCompiler.cmake 
	CMakeDetermineCompilerId.cmake 
	CMakeDetermineFortranCompiler.cmake 
	CMakeFortranCompiler.cmake.in CMakeFortranInformation.cmake 
Added Files:
	CMakeFortranCompilerId.F90 
Log Message:
ENH: Merging CompilerId updates from branch CMake-Modules-CompilerId to the main tree.  Changes between CMake-Modules-CompilerId-mp1 and CMake-Modules-CompilerId-mp2 are included.


Index: CMakeDetermineCXXCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCXXCompiler.cmake,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- CMakeDetermineCXXCompiler.cmake	28 Apr 2007 13:35:01 -0000	1.34
+++ CMakeDetermineCXXCompiler.cmake	3 May 2007 12:24:32 -0000	1.35
@@ -88,7 +88,7 @@
   # Try to identify the compiler.
   SET(CMAKE_CXX_COMPILER_ID)
   INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
-  CMAKE_DETERMINE_COMPILER_ID(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerId.cpp)
+  CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS ${CMAKE_ROOT}/Modules/CMakeCXXCompilerId.cpp)
 
   # Set old compiler and platform id variables.
   IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

Index: CMakeCInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCInformation.cmake,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- CMakeCInformation.cmake	11 Apr 2006 20:55:48 -0000	1.10
+++ CMakeCInformation.cmake	3 May 2007 12:24:32 -0000	1.11
@@ -7,6 +7,11 @@
 IF(CMAKE_COMPILER_IS_GNUCC)
   SET(CMAKE_BASE_NAME gcc)
 ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_C_COMPILER_ID)
+  IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake)
+    SET(CMAKE_BASE_NAME ${CMAKE_C_COMPILER_ID}-C)
+  ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C.cmake)
+ENDIF(CMAKE_C_COMPILER_ID)
 SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE 
   ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)

Index: CMakeDetermineFortranCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineFortranCompiler.cmake,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CMakeDetermineFortranCompiler.cmake	21 Feb 2007 15:03:11 -0000	1.14
+++ CMakeDetermineFortranCompiler.cmake	3 May 2007 12:24:32 -0000	1.15
@@ -74,41 +74,61 @@
 ENDIF(NOT CMAKE_RANLIB)
 MARK_AS_ADVANCED(CMAKE_RANLIB)
 
-# do not test for GNU if the generator is visual studio
+# Build a small source file to identify the compiler.
 IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
-  SET(CMAKE_COMPILER_IS_GNUG77_RUN 1)
-ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") 
+  SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
+  SET(CMAKE_Fortran_PLATFORM_ID "Windows")
 
-IF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
-  # test to see if the Fortran compiler is gnu
-  
-  IF(CMAKE_Fortran_FLAGS)
-    SET(CMAKE_BOOT_Fortran_FLAGS ${CMAKE_Fortran_FLAGS})
-  ELSE(CMAKE_Fortran_FLAGS)
-    SET(CMAKE_BOOT_Fortran_FLAGS $ENV{FFLAGS})
-  ENDIF(CMAKE_Fortran_FLAGS)
-  EXEC_PROGRAM(${CMAKE_Fortran_COMPILER} ARGS ${CMAKE_BOOT_Fortran_FLAGS} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
-  SET(CMAKE_COMPILER_IS_GNUG77_RUN 1)
-  IF(NOT CMAKE_COMPILER_RETURN)
-    IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
-      SET(CMAKE_COMPILER_IS_GNUG77 1)
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-        "Determining if the Fortran compiler is GNU succeeded with "
-        "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
-    ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
-      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
-        "Determining if the Fortran compiler is GNU failed with "
-        "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
-    ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
-    IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
-      SET(CMAKE_COMPILER_IS_MINGW 1)
-    ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
-    IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
-      SET(CMAKE_COMPILER_IS_CYGWIN 1)
-    ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
-  ENDIF(NOT CMAKE_COMPILER_RETURN)
-ENDIF(NOT CMAKE_COMPILER_IS_GNUG77_RUN)
+  # TODO: Set the compiler id.  It is probably MSVC but
+  # the user may be using an integrated Intel compiler.
+  # SET(CMAKE_Fortran_COMPILER_ID "MSVC")
+ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+
+IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
+  SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
 
+  # Try to identify the compiler.
+  SET(CMAKE_Fortran_COMPILER_ID)
+  INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
+  CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS ${CMAKE_ROOT}/Modules/CMakeFortranCompilerId.F90)
+
+  # Fall back to old is-GNU test.
+  IF(NOT CMAKE_Fortran_COMPILER_ID)
+    EXEC_PROGRAM(${CMAKE_Fortran_COMPILER}
+      ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
+      OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
+    IF(NOT CMAKE_COMPILER_RETURN)
+      IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+        SET(CMAKE_Fortran_COMPILER_ID "GNU")
+        FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+          "Determining if the Fortran compiler is GNU succeeded with "
+          "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
+      ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+        FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+          "Determining if the Fortran compiler is GNU failed with "
+          "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
+      ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+      IF(NOT CMAKE_Fortran_PLATFORM_ID)
+        IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+          SET(CMAKE_Fortran_PLATFORM_ID "MinGW")
+        ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+        IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+          SET(CMAKE_Fortran_PLATFORM_ID "Cygwin")
+        ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+      ENDIF(NOT CMAKE_Fortran_PLATFORM_ID)
+    ENDIF(NOT CMAKE_COMPILER_RETURN)
+  ENDIF(NOT CMAKE_Fortran_COMPILER_ID)
+
+  # Set old compiler and platform id variables.
+  IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+    SET(CMAKE_COMPILER_IS_GNUG77 1)
+  ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+  IF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
+    SET(CMAKE_COMPILER_IS_MINGW 1)
+  ELSEIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
+    SET(CMAKE_COMPILER_IS_CYGWIN 1)
+  ENDIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
+ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
 
 # configure variables set in this file for fast reload later on
 CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in 

Index: CMakeFortranInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranInformation.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CMakeFortranInformation.cmake	15 Sep 2006 18:02:41 -0000	1.13
+++ CMakeFortranInformation.cmake	3 May 2007 12:24:32 -0000	1.14
@@ -8,6 +8,11 @@
 IF(CMAKE_COMPILER_IS_GNUG77)
   SET(CMAKE_BASE_NAME g77)
 ENDIF(CMAKE_COMPILER_IS_GNUG77)
+IF(CMAKE_Fortran_COMPILER_ID)
+  IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+    SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
+  ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
+ENDIF(CMAKE_Fortran_COMPILER_ID)
 SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
   ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
@@ -42,9 +47,9 @@
   SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
 ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
 
-IF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
   SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
 
 IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
   SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) 

--- NEW FILE: CMakeFortranCompilerId.F90 ---
PROGRAM CMakeFortranCompilerId
!     Identify the compiler
#if defined(__INTEL_COMPILER) || defined(__ICC)
   PRINT *, 'INFO:compiler[Intel]'
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
   PRINT *, 'INFO:compiler[SunPro]'
#elif defined(__GNUC__)
   PRINT *, 'INFO:compiler[GNU]'
#elif defined(_COMPILER_VERSION)
   PRINT *, 'INFO:compiler[MIPSpro]'
!     This compiler is either not known or is too old to define an
!     identification macro.  Try to identify the platform and guess that
!     it is the native compiler.
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
   PRINT *, 'INFO:compiler[VisualAge]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
   PRINT *, 'INFO:compiler[MIPSpro]'
#elif defined(__hpux) || defined(__hpux__)
   PRINT *, 'INFO:compiler[HP]'
#else
   PRINT *, 'INFO:compiler[]'
#endif

!     Identify the platform
#if defined(__linux) || defined(__linux__) || defined(linux)
   PRINT *, 'INFO:platform[Linux]'
#elif defined(__CYGWIN__)
   PRINT *, 'INFO:platform[Cygwin]'
#elif defined(__MINGW32__)
   PRINT *, 'INFO:platform[MinGW]'
#elif defined(__APPLE__)
   PRINT *, 'INFO:platform[Darwin]'
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
   PRINT *, 'INFO:platform[Windows]'
#elif defined(__FreeBSD__) || defined(__FreeBSD)
   PRINT *, 'INFO:platform[FreeBSD]'
#elif defined(__NetBSD__) || defined(__NetBSD)
   PRINT *, 'INFO:platform[NetBSD]'
#elif defined(__OpenBSD__) || defined(__OPENBSD)
   PRINT *, 'INFO:platform[OpenBSD]'
#elif defined(__sun) || defined(sun)
   PRINT *, 'INFO:platform[SunOS]'
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
   PRINT *, 'INFO:platform[AIX]'
#elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
   PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
   PRINT *, 'INFO:platform[HP-UX]'
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
   PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
   PRINT *, 'INFO:platform[QNX]'
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
   PRINT *, 'INFO:platform[Tru64]'
#elif defined(__riscos) || defined(__riscos__)
   PRINT *, 'INFO:platform[RISCos]'
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
   PRINT *, 'INFO:platform[SINIX]'
#elif defined(__UNIX_SV__)
   PRINT *, 'INFO:platform[UNIX_SV]'
#elif defined(__bsdos__)
   PRINT *, 'INFO:platform[BSDOS]'
#elif defined(_MPRAS) || defined(MPRAS)
   PRINT *, 'INFO:platform[MP-RAS]'
#elif defined(__osf) || defined(__osf__)
   PRINT *, 'INFO:platform[OSF1]'
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
   PRINT *, 'INFO:platform[SCO_SV]'
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
   PRINT *, 'INFO:platform[ULTRIX]'
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
   PRINT *, 'INFO:platform[Xenix]'
#else
   PRINT *, 'INFO:platform[]'
#endif
END PROGRAM

Index: CMakeDetermineCompilerId.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCompilerId.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CMakeDetermineCompilerId.cmake	30 Apr 2007 21:05:32 -0000	1.3
+++ CMakeDetermineCompilerId.cmake	3 May 2007 12:24:32 -0000	1.4
@@ -3,7 +3,7 @@
 # used internally by CMake and should not be included by user code.
 # If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
 
-MACRO(CMAKE_DETERMINE_COMPILER_ID lang src)
+MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
   # Store the compiler identification source file.
   SET(CMAKE_${lang}_COMPILER_ID_SRC "${src}")
   IF(WIN32 AND NOT CYGWIN)
@@ -18,7 +18,7 @@
   IF(CMAKE_${lang}_FLAGS)
     SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
   ELSE(CMAKE_${lang}_FLAGS)
-    SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${lang}FLAGS})
+    SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
   ENDIF(CMAKE_${lang}_FLAGS)
 
   # Create an empty directory in which to run the test.
@@ -81,13 +81,14 @@
       FILE(STRINGS ${CMAKE_${lang}_COMPILER_ID_EXE}
         CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
       FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
-        IF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
-          STRING(REGEX REPLACE ".*INFO:compiler\\[(.*)\\].*" "\\1"
+        IF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
+          STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
             CMAKE_${lang}_COMPILER_ID "${info}")
-        ELSEIF("${info}" MATCHES ".*INFO:platform\\[(.*)\\].*")
-          STRING(REGEX REPLACE ".*INFO:platform\\[(.*)\\].*" "\\1"
+        ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
+        IF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
+          STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
             CMAKE_${lang}_PLATFORM_ID "${info}")
-        ENDIF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
+        ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
       ENDFOREACH(info)
 
       # Check the compiler identification string.

Index: CMakeCXXInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXInformation.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CMakeCXXInformation.cmake	15 Sep 2006 18:08:36 -0000	1.13
+++ CMakeCXXInformation.cmake	3 May 2007 12:24:32 -0000	1.14
@@ -8,6 +8,11 @@
 IF(CMAKE_COMPILER_IS_GNUCXX)
   SET(CMAKE_BASE_NAME g++)
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+IF(CMAKE_CXX_COMPILER_ID)
+  IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX.cmake)
+    SET(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER_ID}-CXX)
+  ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX.cmake)
+ENDIF(CMAKE_CXX_COMPILER_ID)
 SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
   ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
 INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
@@ -43,9 +48,9 @@
   SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
 ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
 
-IF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
   SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
 
 IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
   SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) 

Index: CMakeFortranCompiler.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranCompiler.cmake.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CMakeFortranCompiler.cmake.in	4 Jul 2006 15:06:38 -0000	1.7
+++ CMakeFortranCompiler.cmake.in	3 May 2007 12:24:32 -0000	1.8
@@ -1,5 +1,7 @@
 SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
 SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
+SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
+SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
 SET(CMAKE_AR "@CMAKE_AR@")
 SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
 SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
@@ -11,10 +13,12 @@
   SET(UNIX 1)
 ENDIF(CMAKE_COMPILER_IS_CYGWIN)
 
+SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
+
 IF(CMAKE_COMPILER_IS_MINGW)
   SET(MINGW 1)
 ENDIF(CMAKE_COMPILER_IS_MINGW)
-SET(CMAKE_COMPILER_IS_GNUG77_RUN 1)
+SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
 SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;f95;F95)
 SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
 SET(CMAKE_Fortran_LINKER_PREFERENCE Prefered)
@@ -23,4 +27,3 @@
 ELSE(UNIX)
   SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
 ENDIF(UNIX)
-SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")

Index: CMakeDetermineCCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCCompiler.cmake,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- CMakeDetermineCCompiler.cmake	28 Apr 2007 13:35:01 -0000	1.39
+++ CMakeDetermineCCompiler.cmake	3 May 2007 12:24:32 -0000	1.40
@@ -68,7 +68,7 @@
   # Try to identify the compiler.
   SET(CMAKE_C_COMPILER_ID)
   INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
-  CMAKE_DETERMINE_COMPILER_ID(C ${CMAKE_ROOT}/Modules/CMakeCCompilerId.c)
+  CMAKE_DETERMINE_COMPILER_ID(C CFLAGS ${CMAKE_ROOT}/Modules/CMakeCCompilerId.c)
 
   # Set old compiler and platform id variables.
   IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")



More information about the Cmake-commits mailing list