1. 17 Feb, 2016 4 commits
    • Brad King's avatar
      Fix export of STATIC library PRIVATE non-target dependencies · 87f44b75
      Brad King authored
      In commit v3.5.0-rc1~43^2 (Fix export of STATIC library PRIVATE
      dependencies with CMP0022 NEW, 2016-01-15) we taught
      target_link_libraries to generate `$<LINK_ONLY:$<TARGET_NAME:dep>>` in
      INTERFACE_LINK_LIBRARIES instead of `$<LINK_ONLY:dep>` so that `dep` can
      be recognized as a target name and updated during export.  However, this
      approach does not work when `dep` is just a plain library name and not a
      target because `$<TARGET_NAME:...>` requires the name of a reachable
      target.
      
      Since we do not know during target_link_libraries whether the name will
      correspond to a reachable target or not, we cannot inject the
      `$<TARGET_NAME:...>` expression.  Revert this change and solve the
      original problem instead by teaching the export logic to recognize and
      update target names directly in `$<LINK_ONLY:...>` expressions.
      Reported-by: Ben Boeckel's avatarBen Boeckel <ben.boeckel@kitware.com>
      87f44b75
  2. 13 Aug, 2015 4 commits
    • Brad King's avatar
      cmComputeLinkInformation: Lookup a target only if we have one · 9b449e9c
      Brad King authored
      The change in commit 27252b24 (cmComputeLinkInformation: Simplify
      generator object access, 2015-08-02) broke the conditional use of a
      target introduced in commit 41abdc17 (cmGeneratorTarget: Move GetSOName
      from cmTarget, 2015-08-04).  Restore the conditional lookup.  Add a test
      case that hacks platform information variables to trigger this code
      everywhere.
      9b449e9c
  3. 25 Jun, 2015 4 commits
    • Brad King's avatar
      cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) · 30c2e1dd
      Brad King authored
      Since commit v3.3.0-rc1~62^2~5 (cmTarget: Store only cmListFileContext
      for CMP0023 handling, 2015-05-18) a call to target_link_libraries on a
      target that was defined in another (non-ancestor) directory crashes
      because no execution context is left active.  Fix this by getting the
      execution context from the actual cmMakefile where the current
      target_link_libraries call takes place.  Test this by verifying that
      such calls correctly produce an error diagnostic instead of crashing.
      30c2e1dd
  4. 24 Jul, 2013 4 commits