Skip to content
  • Stephen Kelly's avatar
    add_custom_command: Normalize OUTPUT and DEPENDS paths. · c4af46b4
    Stephen Kelly authored
    While tracing dependencies of a target, cmTargetTraceDependencies
    follows sources by full path to determine if the source is to be
    produced by a custom command.  Commit 4959f341 (cmSourceFileLocation:
    Collapse full path for directory comparisons., 2014-03-27) changed
    the storage of target sources to be in the form of a normalized
    path instead of an unnormalized path.
    
    The path is followed by looking it up in a mapping via
    cmMakefile::GetSourceFileWithOutput to acquire an appropriate
    cmSourceFile.  The mapping is populated with the OUTPUT components
    of add_custom_command invocations, however it is populated with
    unnormalized paths.  This means that the tracing logic does not
    find appropriate cmSourceFiles, and does not generate appropriate
    build rules for the generated sources.
    
    Normalize the paths in the OUTPUT components of add_custom_command
    to resolve this.
    
    The paths in the DEPENDS component of add_custom_command are also
    not normalized, leading to the same problem again.  Normalize the
    depends paths after generator evaluation and expansion.
    c4af46b4