1. 11 Sep, 2015 1 commit
    • Brad King's avatar
      CMakeParseImplicitLinkInfo: Do not match "VAR=..." as link line (#15737) · 97ffbcd8
      Brad King authored
      When compiling with
      
        LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
      
      the compiler output includes a line like
      
        COLLECT_GCC_OPTIONS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ...
      
      that our link line regex matches due to an argument ending in "-ld".
      Since it is not really the link line no implicit link information is
      dectected.  Exclude "VAR=..." lines from consideration as link lines to
      fix this.
      97ffbcd8
  2. 18 Feb, 2015 1 commit
  3. 01 Dec, 2014 1 commit
  4. 14 Apr, 2014 1 commit
  5. 17 May, 2013 1 commit
    • Brad King's avatar
      Sanitize linker name to parse implicit link line (#14154) · ffda082e
      Brad King authored
      Teach CMakeParseImplicitLinkInfo to convert the CMAKE_LINKER file name
      to a regular expression that matches only the original name.  Escape
      special characters like '+' so they are not treated as regex syntax.
      Extend the ImplicitLinkInfoTest to test handling of a CMAKE_LINKER value
      with many special characters.
      ffda082e
  6. 06 May, 2013 1 commit
  7. 06 Feb, 2013 1 commit
    • Brad King's avatar
      Normalize full paths in implicit link library list · 10e8b2da
      Brad King authored
      Teach CMakeParseImplicitLinkInfo to convert implicit link library full
      paths to a canonical form.  This makes them more reproducible in case
      different language compiler front-ends add the same library by different
      paths e.g. ".../libA.a" and "...//libA.a".
      
      Add a case to the CMake.ImplicitLinkInfo test to cover removal of extra
      slashes from both library and directory paths.
      10e8b2da
  8. 11 Dec, 2012 2 commits
    • Brad King's avatar
      OS X: Detect implicit linker framework search paths · cc676c3a
      Brad King authored
      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.
      cc676c3a
    • Brad King's avatar
      OS X: Detect implicit link directories on modern toolchains · 2dd67c7e
      Brad King authored
      We detect the implicit link directories for the toolchain by adding a
      flag to get verbose output from the compiler front-end while linking the
      ABI detection binary.  Newer OS X toolchains based on Clang do not add
      the implicit link directories with -L options to their internal
      invocation of "ld".  Instead they use a linker that comes with the
      toolchain and is already configured with the proper directories.
      
      Add the "-Wl,-v" option to ask "ld" to print its implicit directories.
      It displays them in a block such as:
      
       Library search paths:
      	/...
      
      Parse this block to extract the implicit link directories.
      
      While at it, remove the checks introduced by commit efaf335b (Skip
      implicit link information on Xcode, 2009-07-23) and commit 5195a664
      (Skip implicit link info for multiple OS X archs, 2009-09-22).  Discard
      the non-system link directories added by Xcode.  Discard all detected
      implicit libraries in the multi-architecture case but keep the
      directories.  The directories are still useful without the libraries
      just to suppress addition of explicit -L options for them.
      2dd67c7e
  9. 20 May, 2011 1 commit
    • Brad King's avatar
      Absoft: Detect implicit link libraries on Linux and Mac · d7b376b3
      Brad King authored
      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>".
      d7b376b3
  10. 09 Dec, 2010 1 commit
    • Brad King's avatar
      Detect object files in implicit link information · fe3f878f
      Brad King authored
      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.
      fe3f878f
  11. 09 Aug, 2010 1 commit
  12. 11 Nov, 2009 1 commit
  13. 05 Nov, 2009 1 commit
    • Brad King's avatar
      Remove non-language implicit link dependencies · 56d46199
      Brad King authored
      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.
      56d46199
  14. 09 Oct, 2009 1 commit
  15. 07 Oct, 2009 1 commit
    • Brad King's avatar
      More robust implicit link line detection regex · fff1c6d2
      Brad King authored
      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.
      fff1c6d2
  16. 06 Oct, 2009 2 commits
    • Brad King's avatar
      Log implicit link line detection regex · 20e6ac32
      Brad King authored
      This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
      the regex it uses to detect the linker invocation line.  The regex is
      computed from the CMAKE_LINKER if it is found, so it might change.  A
      strange value might match the wrong line and cause implicit link info
      extraction to fail.
      
      See issue #9666.
      20e6ac32
    • Brad King's avatar
      Log implicit link information parsing actions · b9850a61
      Brad King authored
      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.
      b9850a61
  17. 01 Oct, 2009 1 commit
  18. 28 Sep, 2009 1 commit
    • Brad King's avatar
      Convert CMake non-find modules to BSD License · 3a666595
      Brad King authored
      This adds copyright/license notification blocks CMake's non-find
      modules.  Most of the modules had no notices at all.  Some had notices
      referring to the BSD license already.  This commit normalizes existing
      notices and adds missing notices.
      3a666595
  19. 29 Jul, 2009 1 commit
    • Brad King's avatar
      Recognize linker commands without paths · edad475e
      Brad King authored
      This teaches the implicit link line parsing code to recognize link lines
      that do not have a full path to the linker executable.  At least one
      version of the Intel compiler on Linux invokes the linker as just "ld"
      instead of "/usr/bin/ld".
      edad475e
  20. 28 Jul, 2009 1 commit
    • Brad King's avatar
      BUG: Parse implicit link editor -z*extract options · 83644766
      Brad King authored
      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.
      83644766
  21. 23 Jul, 2009 1 commit
    • Brad King's avatar
      ENH: Implicit link info for C, CXX, and Fortran · 07ea19ad
      Brad King authored
      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.
      07ea19ad