Clang.cmake 997 B

12345678910111213141516171819202122232425262728
  1. #=============================================================================
  2. # Copyright 2002-2012 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. # This module is shared by multiple languages; use include blocker.
  14. if(__COMPILER_CLANG)
  15. return()
  16. endif()
  17. set(__COMPILER_CLANG 1)
  18. include(Compiler/GNU)
  19. macro(__compiler_clang lang)
  20. __compiler_gnu(${lang})
  21. set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
  22. set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
  23. set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
  24. endmacro()