summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentVariables.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-23 14:07:25 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-23 14:07:25 (GMT)
commit07ea19ad1f280e7a1cb07ab2b52c0081f72251dd (patch)
tree3844b6660772215cdae9420ddcfa3574be35e8db /Source/cmDocumentVariables.cxx
parent797e49a1cc53fb120fad286665c875075eb18361 (diff)
downloadCMake-07ea19ad1f280e7a1cb07ab2b52c0081f72251dd.zip
CMake-07ea19ad1f280e7a1cb07ab2b52c0081f72251dd.tar.gz
CMake-07ea19ad1f280e7a1cb07ab2b52c0081f72251dd.tar.bz2
ENH: Implicit link info for C, CXX, and Fortran
This teaches CMake to detect implicit link information for C, C++, and Fortran compilers. We detect the implicit linker search directories and implicit linker options for UNIX-like environments using verbose output from compiler front-ends. We store results in new variables called CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES The implicit libraries can contain linker flags as well as library names.
Diffstat (limited to 'Source/cmDocumentVariables.cxx')
-rw-r--r--Source/cmDocumentVariables.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 85d8c85..fa762f6 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1179,7 +1179,28 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"This prevents system include directories from being treated as user "
"include directories on some compilers.", false,
"Variables for Languages");
-
+
+ cm->DefineProperty
+ ("CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES", cmProperty::VARIABLE,
+ "Implicit linker search path detected for language <LANG>.",
+ "Compilers typically pass directories containing language runtime "
+ "libraries and default library search paths when they invoke a linker. "
+ "These paths are implicit linker 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 "
+ "other flags when they invoke a linker. "
+ "These flags are implicit link options for the compiler's language. "
+ "CMake automatically detects these libraries and flags for each "
+ "language and reports the results in this variable.", false,
+ "Variables for Languages");
+
cm->DefineProperty
("CMAKE_<LANG>_LINKER_PREFERENCE", cmProperty::VARIABLE,
"Determine if a language should be used for linking.",