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

« back to all changes in this revision

Viewing changes to Modules/CMakeTestCXXCompiler.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 2003-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 is used by EnableLanguage in cmGlobalGenerator to
3
16
# determine that that selected C++ compiler can actually compile
4
17
# and link the most basic of programs.   If not, a fatal error
19
32
 
20
33
IF(NOT CMAKE_CXX_COMPILER_WORKS)
21
34
  MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken")
 
35
  # if the compiler is broken make sure to remove the platform file
 
36
  # since Windows-cl configures both c/cxx files both need to be removed
 
37
  # when c or c++ fails
 
38
  FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
 
39
  FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
22
40
  FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
23
41
    "Determining if the CXX compiler works failed with "
24
42
    "the following output:\n${OUTPUT}\n\n")