From: <ai...@us...> - 2009-01-22 22:18:00
|
Revision: 9375 http://plplot.svn.sourceforge.net/plplot/?rev=9375&view=rev Author: airwin Date: 2009-01-22 22:17:51 +0000 (Thu, 22 Jan 2009) Log Message: ----------- Remove Fortran workaround cruft for CMake version 2.4.x that is no longer necessary because our CMake minimum version is now 2.6.0 Modified Paths: -------------- trunk/bindings/f95/CMakeLists.txt trunk/cmake/modules/CMakeFortranInformation.cmake trunk/examples/f77/x20f.fm4 trunk/examples/f95/CMakeLists.txt trunk/examples/f95/x20f.f90 Modified: trunk/bindings/f95/CMakeLists.txt =================================================================== --- trunk/bindings/f95/CMakeLists.txt 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/bindings/f95/CMakeLists.txt 2009-01-22 22:17:51 UTC (rev 9375) @@ -158,30 +158,15 @@ RUNTIME DESTINATION ${BIN_DIR} ) - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # Yuk! All Makefiles are run from the top level build directory and - # so the f90 .mod files end up there rather than in the bindings/f95 - # directory. Ifort and pgf90 both have a -module command line option to - # override this location, but I'm not sure how portable that? - install( - FILES - ${CMAKE_BINARY_DIR}/plplot.mod - ${CMAKE_BINARY_DIR}/plplotp.mod - ${CMAKE_BINARY_DIR}/plplot_flt.mod - DESTINATION ${F95_MOD_DIR} - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # For the current cvs version of CMake, the module files are created by - # default during the library build in the more logical bindings/f95 - # directory. - install( - FILES - ${CMAKE_BINARY_DIR}/bindings/f95/plplot.mod - ${CMAKE_BINARY_DIR}/bindings/f95/plplotp.mod - ${CMAKE_BINARY_DIR}/bindings/f95/plplot_flt.mod - DESTINATION ${F95_MOD_DIR} - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # For CMake-2.6.0 and above, the module files are created by + # default during the library build in the bindings/f95 directory. + install( + FILES + ${CMAKE_BINARY_DIR}/bindings/f95/plplot.mod + ${CMAKE_BINARY_DIR}/bindings/f95/plplotp.mod + ${CMAKE_BINARY_DIR}/bindings/f95/plplot_flt.mod + DESTINATION ${F95_MOD_DIR} + ) # Configure pkg-config *.pc file corresponding to libplplotf95${LIB_TAG} if(PKG_CONFIG_EXECUTABLE) Modified: trunk/cmake/modules/CMakeFortranInformation.cmake =================================================================== --- trunk/cmake/modules/CMakeFortranInformation.cmake 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/cmake/modules/CMakeFortranInformation.cmake 2009-01-22 22:17:51 UTC (rev 9375) @@ -150,13 +150,8 @@ # compile a Fortran file into an object file IF(NOT CMAKE_Fortran_COMPILE_OBJECT) - IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) - SET(CMAKE_Fortran_COMPILE_OBJECT - "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>") - ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) - SET(CMAKE_Fortran_COMPILE_OBJECT - "<CMAKE_Fortran_COMPILER> -o <OBJECT> <FLAGS> -c <SOURCE>") - ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + SET(CMAKE_Fortran_COMPILE_OBJECT + "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>") ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT) # link a fortran program Modified: trunk/examples/f77/x20f.fm4 =================================================================== --- trunk/examples/f77/x20f.fm4 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f77/x20f.fm4 2009-01-22 22:17:51 UTC (rev 9375) @@ -386,11 +386,9 @@ C C Note: C The algorithm only works if the unit of record length is a byte! -C (Some compilers _use_ a word (4 bytes) instead, but often provide -C a compile switch to _use_ bytes) +C (Some compilers use a word (4 bytes) instead, but often provide +C a compile switch to use bytes) C -C NOTE: _use_ is used instead of the ordinary word because of a -C bug in CMake C open( 10, file = fname, access = 'direct', recl = 1 ) @@ -439,7 +437,7 @@ C Create a new one call plmkstrm(new_strm) -C New device type. _Use_ a known existing driver +C New device type. Use a known existing driver call plsdev('psc') call plsfnam(fname) Modified: trunk/examples/f95/CMakeLists.txt =================================================================== --- trunk/examples/f95/CMakeLists.txt 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f95/CMakeLists.txt 2009-01-22 22:17:51 UTC (rev 9375) @@ -72,27 +72,9 @@ if(BUILD_TEST) remove_definitions("-DHAVE_CONFIG_H") - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # Temporary workaround for module handling bug in CMake 2.4.3. Create a - # file with arbitrary contents called plplot.mod.proxy in top-level - # build tree. As a temporary measure we use cmake_workaround.f as the - # generator of this file. (cmake_workaround.f was previously compiled, - # but that is no longer the case.) Note, once CMake is fixed this comment - # the following configure_file command and cmake_workaround.f should all - # just disappear. - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake_workaround.f - ${CMAKE_BINARY_DIR}/plplot.mod.proxy - COPYONLY - ) - # The generated module location for 2.4.x CMake is the top-level build - # tree. - include_directories(${CMAKE_BINARY_DIR}) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) - # The generated module location for cvs CMake is the build-tree - # location where the corresponding library is generated. - include_directories(${CMAKE_BINARY_DIR}/bindings/f95) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4) + # For CMake-2.6.0 and above, the module files are created by + # default during the library build in the bindings/f95 directory. + include_directories(${CMAKE_BINARY_DIR}/bindings/f95) endif(BUILD_TEST) foreach(STRING_INDEX ${f95_STRING_INDICES}) set(f95_SRCS ${f95_SRCS} x${STRING_INDEX}f.f90) Modified: trunk/examples/f95/x20f.f90 =================================================================== --- trunk/examples/f95/x20f.f90 2009-01-22 22:16:26 UTC (rev 9374) +++ trunk/examples/f95/x20f.f90 2009-01-22 22:17:51 UTC (rev 9375) @@ -373,12 +373,9 @@ ! ! Note: ! The algorithm only works if the unit of record length is a byte! -! (Some compilers _use_ a word (4 bytes) instead, but often provide -! a compile switch to _use_ bytes) +! (Some compilers use a word (4 bytes) instead, but often provide +! a compile switch to use bytes) ! -! NOTE: _use_ is used instead of the ordinary word because of a -! bug in CMake -! open( 10, file = fname, access = 'direct', recl = 1 ) record = 0 @@ -428,7 +425,7 @@ ! Create a new one call plmkstrm(new_strm) -! New device type. _Use_ a known existing driver +! New device type. Use a known existing driver call plsdev('psc') call plsfnam(fname) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |