summaryrefslogtreecommitdiff
path: root/Modules/Platform/Darwin.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-10 08:29:04 -0400
committerBrad King <brad.king@kitware.com>2013-10-10 08:33:25 -0400
commit2e13c362117dbd0df2d5fff1c00ee8af2707185a (patch)
tree25272e06ea8f577f242c2158dd986210bc6c7d66 /Modules/Platform/Darwin.cmake
parent872db622d62012d6ea0c2142d75f9a0b97949004 (diff)
downloadcmake-2e13c362117dbd0df2d5fff1c00ee8af2707185a.tar.gz
OS X: Encode -F framework search flag in per-language platform variable
Compilers for languages other than C and C++ on OS X may not understand the -F framework search flag. Create a new platform information variable CMAKE_<LANG>_FRAMEWORK_SEARCH_FLAG to hold the flag, and set it for C and CXX lanugages in the Platform/Darwin module. Reported-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'Modules/Platform/Darwin.cmake')
-rw-r--r--Modules/Platform/Darwin.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 72844b5315..8ab3e2c12e 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -268,6 +268,11 @@ set(CMAKE_C_CREATE_MACOSX_FRAMEWORK
set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
+# Set default framework search path flag for languages known to use a
+# preprocessor that may find headers in frameworks.
+set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F)
+set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F)
+set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F)
# default to searching for frameworks first
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)