summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Darwin-Clang.cmake
diff options
context:
space:
mode:
authorMikoĊ‚aj Siedlarek <msiedlarek@nctz.net>2014-05-05 10:39:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-07 13:04:48 (GMT)
commit1bed75a590707c311de6feddafdfb32cbb9e4afb (patch)
treecedeced7528d4a7c8b878a052b713b38f1d03565 /Modules/Platform/Darwin-Clang.cmake
parent1aed32faaeff40dcde2fa7cb75c7c249e68485e3 (diff)
downloadCMake-1bed75a590707c311de6feddafdfb32cbb9e4afb.zip
CMake-1bed75a590707c311de6feddafdfb32cbb9e4afb.tar.gz
CMake-1bed75a590707c311de6feddafdfb32cbb9e4afb.tar.bz2
OS X: Use -iframework for system framework directories
Just like -I flag has its -isystem counterpart which marks an include directory as a system directory and prevents unwanted warnings, on Apple systems there is -iframework -- a system directory replacement for -F. Use this flag to implement include_directories(SYSTEM) for frameworks.
Diffstat (limited to 'Modules/Platform/Darwin-Clang.cmake')
-rw-r--r--Modules/Platform/Darwin-Clang.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index 528873c..4cded47 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -24,4 +24,7 @@ macro(__darwin_compiler_clang lang)
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.1)
+ set(CMAKE_${lang}_SYSTEM_FRAMEWORK_SEARCH_FLAG "-iframework ")
+ endif()
endmacro()