63c4133b38
Since commit v3.1.0-rc1~564^2 (OS X: Use -iframework for system framework directories, 2014-05-05) we test the version of Clang is smaller that 3.1 to see if it supports -iframework. Considering that "iframework" support has been added in clang@r142418 (Frontend: Support -iframework.) prior to clang 3.1, this made sense. That said, considering that support for multiple -iframework parameters has been added later in clang@r164607 (-iframework should allow separate arguments. ) prior to clang 3.2, this commit updates the check to enable framework support only if version is >= 3.2
31 lines
1.3 KiB
CMake
31 lines
1.3 KiB
CMake
|
|
#=============================================================================
|
|
# Copyright 2002-2012 Kitware, Inc.
|
|
#
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
# see accompanying file Copyright.txt for details.
|
|
#
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
# See the License for more information.
|
|
#=============================================================================
|
|
# (To distribute this file outside of CMake, substitute the full
|
|
# License text for the above reference.)
|
|
|
|
# This module is shared by multiple languages; use include blocker.
|
|
if(__DARWIN_COMPILER_CLANG)
|
|
return()
|
|
endif()
|
|
set(__DARWIN_COMPILER_CLANG 1)
|
|
|
|
macro(__darwin_compiler_clang lang)
|
|
set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
|
|
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
|
|
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
|
|
set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
|
|
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
|
|
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 3.2)
|
|
set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
|
|
endif()
|
|
endmacro()
|