Commit Graph

12 Commits

Author SHA1 Message Date
Brad King d7b376b3a7 Absoft: Detect implicit link libraries on Linux and Mac
Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it
invokes under the hood.  Teach CMakeParseImplicitLinkInfo to exclude
linker version lines from consideration as link lines.  Fix parsing of
Sun's linker search path option "-Y..." to avoid conflict with the Mac
linker option "-Y<num>".
2011-05-20 08:57:51 -04:00
Brad King fe3f878f15 Detect object files in implicit link information
The NAG Fortran compiler implicitly passes object files by full path to
the linker.  Teach CMakeParseImplicitLinkInfo to parse object files that
match some tool-specific regular expression.
2010-12-09 17:07:34 -05:00
Brad King dc577fb8b1 Check Mac linker lines in ImplicitLinkInfo test
We add sample linker invocation lines for the GNU compiler on Mac.
2009-11-05 12:17:21 -05:00
Brad King 56d4619984 Remove non-language implicit link dependencies
Some compilers use implicit link options of the form

  -lcrt*.o
  -lgcc*
  -lSystem      (on Mac)
  -lSystemStubs (on Mac)

that provide system-wide symbols not specific to any language.
These need not be listed explicitly for mixed-language linking.

We teach CMake to remove the above items from the implicit library list
of each language.  This change makes it possible to mix GNU compiler
versions in some cases.
2009-11-05 12:17:08 -05:00
Brad King fff1c6d275 More robust implicit link line detection regex
The regex used by CMAKE_PARSE_IMPLICIT_LINK_INFO to detect link lines
should not match lines that happen to have ".../ld.../..." in them.  A
linker name should match only as the last component of a path.

See issue #9666.
2009-10-07 08:43:51 -04:00
Brad King b9850a614e Log implicit link information parsing actions
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
its actions.  We store the log in CMakeFiles/CMakeOutput.log at the top
of the project build tree.  This will make diagnosis of implicit link
information parsing problems easier.
2009-10-06 15:16:12 -04:00
Brad King 2537a72f8e Check PGI linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the PGI compiler on Linux.
2009-07-29 16:38:12 -04:00
Brad King f47ae0599d Check Intel linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the Intel compiler on
Linux.  In particular, this exercises the case when "ld" appears without
a full path.
2009-07-29 16:07:33 -04:00
Brad King 836447663e BUG: Parse implicit link editor -z*extract options
The Sun Fortran compiler passes -zallextract and -zdefaultextract to the
linker so that all objects from one of its archives are included in the
link.  This teaches the implicit options parser to recognize the flags.
We need to pass them explicitly on C++ link lines when Fortran code is
linked.
2009-07-28 08:36:11 -04:00
Brad King 55718eb869 BUG: Further avoid ImplicitLinkInfo case change
The commit "Avoid case change in ImplicitLinkInfo test" did not change
all of the paths to mingw, so some case change still occurs.  This
changes more of them.
2009-07-25 08:11:57 -04:00
Brad King e981dc99f5 BUG: Avoid case change in ImplicitLinkInfo test
Since "get_filename_component(... ABSOLUTE)" retrieves the actual case
for existing paths on windows, we need to use an obscure path for mingw.
Otherwise the test can fail just because the case of the paths changes.
2009-07-24 07:34:03 -04:00
Brad King c98aaceb92 ENH: Create ImplicitLinkInfo test
This tests the internal CMakeParseImplicitLinkInfo.cmake module to
ensure that implicit link information is extracted correctly.  The test
contains many manually verified examples from a variety of systems.
2009-07-23 10:07:39 -04:00