[Cmake-commits] CMake branch, next, updated. v2.8.3-1538-gcabc087

Brad King brad.king at kitware.com
Mon Jan 31 16:27:01 EST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  cabc087cf9580a413bb40184790887f20cf0eb7e (commit)
       via  93f230e408cba124dc5ba97b1ef7f228ccb4fcc9 (commit)
      from  4db6140ab99f91d20e7c970c1e298a861a60e1fc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cabc087cf9580a413bb40184790887f20cf0eb7e
commit cabc087cf9580a413bb40184790887f20cf0eb7e
Merge: 4db6140 93f230e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 31 16:26:57 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 31 16:26:57 2011 -0500

    Merge topic 'mpif77-workaround-o-c-order' into next
    
    93f230e Pass -o after -c for Fortran to avoid mpif77 ordering bug

diff --cc Modules/CMakeFortranInformation.cmake
index 4f033e3,80f5e46..dc15e55
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@@ -167,20 -163,15 +167,21 @@@ ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_M
  
  # Create a static archive incrementally for large object file counts.
  # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
 -SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
 -SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>")
 -SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
 +IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
 +  SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
 +ENDIF()
 +IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
 +  SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>")
 +ENDIF()
 +IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
 +  SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
 +ENDIF()
  
  # compile a Fortran file into an object file
+ # (put -o after -c to workaround bug in at least one mpif77 wrapper)
  IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
    SET(CMAKE_Fortran_COMPILE_OBJECT
-     "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
+     "<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -c <SOURCE> -o <OBJECT>")
  ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
  
  # link a fortran program

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93f230e408cba124dc5ba97b1ef7f228ccb4fcc9
commit 93f230e408cba124dc5ba97b1ef7f228ccb4fcc9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 31 16:24:12 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 31 16:24:12 2011 -0500

    Pass -o after -c for Fortran to avoid mpif77 ordering bug
    
    When running
    
      $ mpif77 -c example.f -o example.f.o
    
    mpif77 recognizes -o and produces example.f.o, but when running
    
      $ mpif77 -o example.f.o -c example.f
    
    the -o option is ignored and the object file is example.o.  Performing
    the same experiment on the underlying compiler tool or with the mpicc
    and mpiCC wrappers does not exhibit this behavior, so the issue appears
    to be specific to mpif77.
    
    Reported-by: Zhen Wang <zwang26 at emory.edu>

diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index f6a52c6..80f5e46 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -168,9 +168,10 @@ SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r  <TARGET> <LINK_FLAGS> <OBJECTS>"
 SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
 
 # compile a Fortran file into an object file
+# (put -o after -c to workaround bug in at least one mpif77 wrapper)
 IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
   SET(CMAKE_Fortran_COMPILE_OBJECT
-    "<CMAKE_Fortran_COMPILER> -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")
+    "<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -c <SOURCE> -o <OBJECT>")
 ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
 
 # link a fortran program

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeFortranInformation.cmake |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list