diff options
author | Brad King <brad.king@kitware.com> | 2009-07-23 14:07:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-23 14:07:25 (GMT) |
commit | 07ea19ad1f280e7a1cb07ab2b52c0081f72251dd (patch) | |
tree | 3844b6660772215cdae9420ddcfa3574be35e8db /Source/cmDocumentVariables.cxx | |
parent | 797e49a1cc53fb120fad286665c875075eb18361 (diff) | |
download | CMake-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.cxx | 23 |
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.", |