summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Darwin-NAG-Fortran.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-09 22:12:19 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-09 23:12:34 (GMT)
commitaf2ad90991faea2be0dfe62e456794f46758c92a (patch)
treebb66a00631cd648aeed109cebe3b5b68b309201c /Modules/Platform/Darwin-NAG-Fortran.cmake
parent24cc3d48174ef7b120491520ceb9f81389dd6b3e (diff)
downloadCMake-af2ad90991faea2be0dfe62e456794f46758c92a.zip
CMake-af2ad90991faea2be0dfe62e456794f46758c92a.tar.gz
CMake-af2ad90991faea2be0dfe62e456794f46758c92a.tar.bz2
Add NAG Fortran compiler information files
On Linux the NAG Fortran compiler uses gcc under the hood to link. Use "-Wl,-v" to pass "-v" to the underlying gcc compiler to get verbose link output. Detect the NAG Fortran directory (using -dryrun) and then honor object files in the directory referenced in the implicit link line. Pass real linker options with "-Wl,-Xlinker,". The -Wl, gets through the NAG front-end and the -Xlinker gets through the gcc front-end.
Diffstat (limited to 'Modules/Platform/Darwin-NAG-Fortran.cmake')
-rw-r--r--Modules/Platform/Darwin-NAG-Fortran.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin-NAG-Fortran.cmake b/Modules/Platform/Darwin-NAG-Fortran.cmake
new file mode 100644
index 0000000..933f9e1
--- /dev/null
+++ b/Modules/Platform/Darwin-NAG-Fortran.cmake
@@ -0,0 +1,5 @@
+set(CMAKE_Fortran_VERBOSE_FLAG "-Wl,-v") # Runs gcc under the hood.
+
+# Need -fpp explicitly on case-insensitive filesystem.
+set(CMAKE_Fortran_COMPILE_OBJECT
+ "<CMAKE_Fortran_COMPILER> -fpp -o <OBJECT> <DEFINES> <FLAGS> -c <SOURCE>")