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

« back to all changes in this revision

Viewing changes to Modules/CheckCSourceRuns.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
 
# - Check if the C source code provided in the SOURCE argument compiles and runs.
2
 
# CHECK_C_SOURCE_RUNS(SOURCE VAR)
3
 
#
4
 
#  SOURCE   - source code to try to compile
5
 
#  VAR      - variable to store the result, 1 for success, empty for failure
6
 
#
 
1
# - Check if the given C source code compiles and runs.
 
2
# CHECK_C_SOURCE_RUNS(<code> <var>)
 
3
#  <code>   - source code to try to compile
 
4
#  <var>    - variable to store the result
 
5
#             (1 for success, empty for failure)
7
6
# The following variables may be set before calling this macro to
8
7
# modify the way the check is run:
9
8
#
12
11
#  CMAKE_REQUIRED_INCLUDES = list of include directories
13
12
#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
14
13
 
 
14
#=============================================================================
 
15
# Copyright 2006-2009 Kitware, Inc.
 
16
#
 
17
# Distributed under the OSI-approved BSD License (the "License");
 
18
# see accompanying file Copyright.txt for details.
 
19
#
 
20
# This software is distributed WITHOUT ANY WARRANTY; without even the
 
21
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
22
# See the License for more information.
 
23
#=============================================================================
 
24
# (To distributed this file outside of CMake, substitute the full
 
25
#  License text for the above reference.)
 
26
 
15
27
MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
16
28
  IF("${VAR}" MATCHES "^${VAR}$")
17
29
    SET(MACRO_CHECK_FUNCTION_DEFINITIONS