|
From: <arj...@us...> - 2009-02-15 13:22:14
|
Revision: 9528
http://plplot.svn.sourceforge.net/plplot/?rev=9528&view=rev
Author: arjenmarkus
Date: 2009-02-15 13:22:06 +0000 (Sun, 15 Feb 2009)
Log Message:
-----------
Improving detection of command-line support for FORTRAN 77 under Cygwin.
Use the CMake variable that identifies the compiler instead of
CMAKE_COMPILER_IS_GNUG77 - with gfortran that is no longer accurate.
Reversed the return code in the auxiliary program: 1 is success, 0 is failed
Modified Paths:
--------------
trunk/cmake/modules/TestF77CmdLine.cmake
trunk/cmake/modules/TestF77CmdLine.f
Modified: trunk/cmake/modules/TestF77CmdLine.cmake
===================================================================
--- trunk/cmake/modules/TestF77CmdLine.cmake 2009-02-13 22:10:27 UTC (rev 9527)
+++ trunk/cmake/modules/TestF77CmdLine.cmake 2009-02-15 13:22:06 UTC (rev 9528)
@@ -21,7 +21,7 @@
# Check if iargc() works
IF(NOT DEFINED CMAKE_F77_CMD_LINE)
- MESSAGE(STATUS "Check for using namespace support")
+ MESSAGE(STATUS "Check for f77 command line support")
TRY_COMPILE(CMAKE_F77_CMD_LINE
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/cmake/modules/TestF77CmdLine.f
@@ -30,9 +30,10 @@
# Iargc support is broken for with g77 and shared libraries on cygwin
# (as of 2005-12-05, but this problem has been known
# for several years, see http://cygwin.com/ml/cygwin/2005-11/msg00891.html).
- IF (CYGWIN AND CMAKE_COMPILER_IS_GNUG77)
+ IF (CYGWIN AND CMAKE_Fortran_COMPILER_ID MATCHES ".*g77.*")
+ MESSAGE(STATUS "Check for f77 command line support - turning off - ${CMAKE_Fortran_COMPILER_ID} ")
SET (CMAKE_F77_CMD_LINE OFF)
- ENDIF (CYGWIN AND CMAKE_COMPILER_IS_GNUG77)
+ ENDIF (CYGWIN AND CMAKE_Fortran_COMPILER_ID MATCHES ".*g77.*")
IF (CMAKE_F77_CMD_LINE)
MESSAGE(STATUS "Check for f77 command line support - found")
@@ -46,7 +47,7 @@
SET (F77_CMD_LINE 0 CACHE INTERNAL
"Does the f77 compiler support command line arguments")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Determining if the f77 compiler has command line argument support failedd with "
+ "Determining if the f77 compiler has command line argument support failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_F77_CMD_LINE)
ENDIF(NOT DEFINED CMAKE_F77_CMD_LINE)
Modified: trunk/cmake/modules/TestF77CmdLine.f
===================================================================
--- trunk/cmake/modules/TestF77CmdLine.f 2009-02-13 22:10:27 UTC (rev 9527)
+++ trunk/cmake/modules/TestF77CmdLine.f 2009-02-15 13:22:06 UTC (rev 9528)
@@ -13,9 +13,9 @@
c ran into one case (Cygwin) where under certain badly linked
c circumstances, iargc() could return -1
if(narg.lt.0) then
+ call exit(0)
+ else
call exit(1)
- else
- call exit(0)
endif
stop
end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|