• Stephen Kelly's avatar
    cmComputeTargetDepends: Use valid config to compute target depends. · 869328aa
    Stephen Kelly authored
    If CMAKE_BUILD_TYPE is set, and user code contains:
     target_link_libraries(myexe prefix_$<$<CONFIG:Debug>:debug>)
    then the computation with an empty config was computing a target-level
    dependency on a target or library called prefix_, and a dependency
    on a target or library called prefix_debug (as expected).
    The existing logic skips 'prefix_' because it is not a known target,
    and defers to the link-dependencies logic to find the library. The
    link-dependencies logic does not incorrectly handle the config as
    cmComputeTargetDepends did, and so did not encounter 'prefix_'
    during its computation. This likely had no effect on the generated
cmComputeTargetDepends.cxx 22.5 KB