~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Modules/CMakeFortranInformation.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
 
2
#=============================================================================
 
3
# Copyright 2004-2009 Kitware, Inc.
 
4
#
 
5
# Distributed under the OSI-approved BSD License (the "License");
 
6
# see accompanying file Copyright.txt for details.
 
7
#
 
8
# This software is distributed WITHOUT ANY WARRANTY; without even the
 
9
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
10
# See the License for more information.
 
11
#=============================================================================
 
12
# (To distributed this file outside of CMake, substitute the full
 
13
#  License text for the above reference.)
 
14
 
2
15
# This file sets the basic flags for the Fortran language in CMake.
3
16
# It also loads the available platform file for the system-compiler
4
17
# if it exists.
5
18
 
 
19
# Load compiler-specific information.
 
20
IF(CMAKE_Fortran_COMPILER_ID)
 
21
  INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
 
22
ENDIF(CMAKE_Fortran_COMPILER_ID)
 
23
 
6
24
SET(CMAKE_BASE_NAME)
7
25
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
8
26
# since the gnu compiler has several names force g++
10
28
  SET(CMAKE_BASE_NAME g77)
11
29
ENDIF(CMAKE_COMPILER_IS_GNUG77)
12
30
IF(CMAKE_Fortran_COMPILER_ID)
13
 
  IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
14
 
    SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran)
15
 
  ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake)
 
31
  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
16
32
ENDIF(CMAKE_Fortran_COMPILER_ID)
17
 
SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE
18
 
  ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
19
 
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
 
33
IF (NOT _INCLUDED_FILE)
 
34
  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
 
35
          RESULT_VARIABLE _INCLUDED_FILE)
 
36
ENDIF (NOT _INCLUDED_FILE)
 
37
# We specify the compiler information in the system file for some
 
38
# platforms, but this language may not have been enabled when the file
 
39
# was first included.  Include it again to get the language info.
 
40
# Remove this when all compiler info is removed from system files.
 
41
IF (NOT _INCLUDED_FILE)
 
42
  INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
 
43
ENDIF (NOT _INCLUDED_FILE)
 
44
 
20
45
 
21
46
# This should be included before the _INIT variables are
22
47
# used to initialize the cache.  Since the rule variables