From: Andrew R. <and...@us...> - 2007-01-30 09:49:15
|
Update of /cvsroot/plplot/plplot/cmake/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15790/cmake/modules Modified Files: FindSWIG.cmake Log Message: Check both stderr and stdout for swig version number. Older versions of swig used stderr. Index: FindSWIG.cmake =================================================================== RCS file: /cvsroot/plplot/plplot/cmake/modules/FindSWIG.cmake,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FindSWIG.cmake 23 Jan 2007 21:21:25 -0000 1.1 +++ FindSWIG.cmake 30 Jan 2007 09:49:13 -0000 1.2 @@ -37,8 +37,13 @@ IF(SWIG_version_result) MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_error}") ELSE(SWIG_version_result) + IF(SWIG_version_output STREQUAL "") + STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1" + SWIG_version_output "${SWIG_version_error}") + ELSE(SWIG_version_output STREQUAL "") STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1" SWIG_version_output "${SWIG_version_output}") + ENDIF(SWIG_version_output STREQUAL "") SET(SWIG_VERSION ${SWIG_version_output} CACHE STRING "Swig version" FORCE) ENDIF(SWIG_swiglib_result) ENDIF(SWIG_DIR) |