Imported Upstream version 2.8.10.2
[platform/upstream/cmake.git] / Modules / Platform / Darwin-Clang.cmake
1
2 #=============================================================================
3 # Copyright 2002-2012 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 distribute this file outside of CMake, substitute the full
13 #  License text for the above reference.)
14
15 # This module is shared by multiple languages; use include blocker.
16 if(__DARWIN_COMPILER_CLANG)
17   return()
18 endif()
19 set(__DARWIN_COMPILER_CLANG 1)
20
21 macro(__darwin_compiler_clang lang)
22   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
23   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
24   set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
25   set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
26 endmacro()