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

« back to all changes in this revision

Viewing changes to Modules/Platform/Darwin-GNU.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
macro(cmake_gnu_has_isysroot lang)
 
2
  if("x${CMAKE_${lang}_HAS_ISYSROOT}" STREQUAL "x")
 
3
    set(_doc "${lang} compiler has -isysroot")
 
4
    message(STATUS "Checking whether ${_doc}")
 
5
    execute_process(
 
6
      COMMAND ${CMAKE_${lang}_COMPILER} "-v" "--help"
 
7
      OUTPUT_VARIABLE _gcc_help
 
8
      ERROR_VARIABLE _gcc_help
 
9
      )
 
10
    if("${_gcc_help}" MATCHES "isysroot")
 
11
      message(STATUS "Checking whether ${_doc} - yes")
 
12
      set(CMAKE_${lang}_HAS_ISYSROOT 1)
 
13
    else()
 
14
      message(STATUS "Checking whether ${_doc} - no")
 
15
      set(CMAKE_${lang}_HAS_ISYSROOT 0)
 
16
    endif()
 
17
  endif()
 
18
endmacro()