summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-12-05 18:46:04 (GMT)
committerBrad King <brad.king@kitware.com>2012-12-11 20:15:52 (GMT)
commitcc676c3a08019b17433931a9287d9cd8b0ccf2f2 (patch)
tree8dd39816b0c86d71ae2a3dadd384c740bd1da730 /Source/cmDocumentVariables.cxx
parent2dd67c7ea095957d557d2934a67baacdf8a82d7b (diff)
downloadCMake-cc676c3a08019b17433931a9287d9cd8b0ccf2f2.zip
CMake-cc676c3a08019b17433931a9287d9cd8b0ccf2f2.tar.gz
CMake-cc676c3a08019b17433931a9287d9cd8b0ccf2f2.tar.bz2
OS X: Detect implicit linker framework search paths
Previously we hard-coded a list of implicit framework directories but did not account for CMAKE_OSX_SYSROOT or for changes to the list across OS X versions. Instead we should automatically detect the framework directories for the active toolchain. The parent commit added the "-Wl,-v" option to ask "ld" to print its implicit directories. It displays a block such as: Framework search paths: /... Parse this block to extract the list of framework directories. Detection may fail on toolchains that do not list their framework directories, such as older OS X linkers. Always treat the paths <sdk>/Library/Frameworks <sdk>/System/Library/Frameworks <sdk>/Network/Library/Frameworks # Older OS X only /System/Library/Frameworks as implicit. Note that /System/Library/Frameworks should always be considered implicit so that frameworks CMake finds there will not override the SDK copies.
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 55d70f8..0a4170b 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1625,6 +1625,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"Variables for Languages");
cm->DefineProperty
+ ("CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES", cmProperty::VARIABLE,
+ "Implicit linker framework search path detected for language <LANG>.",
+ "These paths are implicit linker framework search directories for "
+ "the compiler's language. "
+ "CMake automatically detects these directories for each language and "
+ "reports the results in this variable.", false,
+ "Variables for Languages");
+
+ cm->DefineProperty
("CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES", cmProperty::VARIABLE,
"Implicit link libraries and flags detected for language <LANG>.",
"Compilers typically pass language runtime library names and "