Imported Upstream version 2.8.11.2
[platform/upstream/cmake.git] / Modules / Compiler / 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(__COMPILER_CLANG)
17   return()
18 endif()
19 set(__COMPILER_CLANG 1)
20
21 include(Compiler/GNU)
22
23 macro(__compiler_clang lang)
24   __compiler_gnu(${lang})
25   set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
26   set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
27 endmacro()