Skip to content
  • Stephen Kelly's avatar
    cmGlobalGenerator: Add ComputeHomeRelativeOutputPath method. · 0efe4944
    Stephen Kelly authored
    Fix generation of tgt/fast build targets.
    
    Commit 363caa2f (cmLocalGenerator: De-virtualize Configure().,
    2015-05-30) moved the computation of HomeRelativeOutputPath from
    Configure-time to Generate-time, because it is only used at
    Generate-time.  However, that commit caused the member for one
    local generator to be computed immediately before generating with
    that local generator, whereas previously the members of all local
    generators were computed before generating any of them.
    
    The HomeRelativeOutputPath is used by the GetRelativeTargetDirectory
    method, which is called by the
    cmGlobalUnixMakefileGenerator3::WriteConvenienceRules method.  That
    method is called by the
    cmLocalUnixMakefileGenerator3::WriteLocalMakefile method when generating
    for the top-most (ie, the first) local generator.  At that point,
    the HomeRelativeOutputPath is not yet computed.
    
    Fix that by computing the member just before generating anything.
    This will eventually be done in the cmLocalUnixMakefileGenerator3
    constructor instead, but further refactoring is needed to make
    that possible.
    0efe4944