Merge topic 'mpif77-workaround-o-c-order'

93f230e Pass -o after -c for Fortran to avoid mpif77 ordering bug
This commit is contained in:
Brad King 2011-02-22 14:31:40 -05:00 committed by CMake Topic Stage
commit 6e450ed7f0
1 changed files with 2 additions and 1 deletions

View File

@ -178,9 +178,10 @@ IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
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