|
Notes |
|
|
(0016951)
|
|
Brad King
|
|
2009-07-23 10:15
|
|
I've implemented automatic detection of implicit link libraries and search directories for C, C++, and Fortran compilers. There is a new undocumented, internal-only module which does the parsing:
Modules/CMakeParseImplicitLinkInfo.cmake
The results are stored in variables
CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
but they are not meant for user consumption. A future commit will make automatic use of them for mixed-language link line computation.
I've added a test file:
Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
which hard-codes a bunch of examples from several platforms and tests that the parser works as expected.
I've tested this with GNU, MIPSpro, HP, VisualAge, SunPro. |
|
|
|
(0016952)
|
|
Brad King
|
|
2009-07-23 10:19
|
|
Detection takes place during the "Detecting <lang> compiler ABI info" step.
In order to enable this for a new compiler, make sure that CMAKE_<LANG>_COMPILER_ID is computed correctly. Then add a module
Modules/Compiler/<id>-<lang>.cmake
containing a line like
SET(CMAKE_<lang>_VERBOSE_FLAG "-v")
The language <lang> can be one of "C", "CXX", or "Fortran".
The ABI detection code passes this flag to its test project and parses the compiler output to extract the link line. |
|
|
|
(0016953)
|
|
Brad King
|
|
2009-07-23 10:20
|
|
|
Currently I do not have access to Intel or PGI compilers. Can you please test CVS HEAD CMake on these compilers? |
|
|
|
(0017014)
|
|
Brad King
|
|
2009-07-29 16:44
|
|
I've committed support for Intel and PGI too.
CMake now automatically handles fortran libraries, so there is no need for users to find them. |
|