summaryrefslogtreecommitdiff
path: root/Modules/CMakeFortranInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-23 10:06:31 -0400
committerBrad King <brad.king@kitware.com>2009-07-23 10:06:31 -0400
commit797e49a1cc53fb120fad286665c875075eb18361 (patch)
tree35981054a7242db17c003936e9b4a9d87b50ed9f /Modules/CMakeFortranInformation.cmake
parentf10c25816761c8e4f9bddf85c76a2022ff9730f9 (diff)
downloadcmake-797e49a1cc53fb120fad286665c875075eb18361.tar.gz
ENH: Load platform-independent per-compiler files
This teaches the language configuration modules to load per-compiler information for each language using the compiler id but no system name. They look for modules named "Compiler/<id>-<lang>.cmake". Such modules may specify compiler flags that do not depend on the platform.
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r--Modules/CMakeFortranInformation.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 25ebe21e31..443d71e6d5 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -3,6 +3,11 @@
# It also loads the available platform file for the system-compiler
# if it exists.
+# Load compiler-specific information.
+IF(CMAKE_Fortran_COMPILER_ID)
+ INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
+ENDIF(CMAKE_Fortran_COMPILER_ID)
+
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++