summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-02-22 19:31:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-02-22 19:31:40 (GMT)
commit6e450ed7f05e98216bc4ddd9f2c82149603de964 (patch)
tree1cfb3e37cb5ce4417afb0bffef06332a250786f0 /Modules/CMakeFortranInformation.cmake
parenta38c1b3584e3009d525caa656798ab8b1dd5e9f8 (diff)
parent93f230e408cba124dc5ba97b1ef7f228ccb4fcc9 (diff)
downloadCMake-6e450ed7f05e98216bc4ddd9f2c82149603de964.zip
CMake-6e450ed7f05e98216bc4ddd9f2c82149603de964.tar.gz
CMake-6e450ed7f05e98216bc4ddd9f2c82149603de964.tar.bz2
Merge topic 'mpif77-workaround-o-c-order'
93f230e Pass -o after -c for Fortran to avoid mpif77 ordering bug
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r--Modules/CMakeFortranInformation.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 4f033e3..dc15e55 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -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