summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Darwin.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-10 12:29:04 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-10 12:33:25 (GMT)
commit2e13c362117dbd0df2d5fff1c00ee8af2707185a (patch)
tree25272e06ea8f577f242c2158dd986210bc6c7d66 /Modules/Platform/Darwin.cmake
parent872db622d62012d6ea0c2142d75f9a0b97949004 (diff)
downloadCMake-2e13c362117dbd0df2d5fff1c00ee8af2707185a.zip
CMake-2e13c362117dbd0df2d5fff1c00ee8af2707185a.tar.gz
CMake-2e13c362117dbd0df2d5fff1c00ee8af2707185a.tar.bz2
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 72844b5..8ab3e2c 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)