Darwin-Clang.cmake 1.2 KB

123456789101112131415161718192021222324252627
  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(__DARWIN_COMPILER_CLANG)
  15. return()
  16. endif()
  17. set(__DARWIN_COMPILER_CLANG 1)
  18. macro(__darwin_compiler_clang lang)
  19. set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
  20. set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
  21. set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
  22. set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
  23. set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
  24. endmacro()