Skip to content
  • Brad King's avatar
    Normalize slashes of add_custom_(command|target) DEPENDS (#11973) · 12860505
    Brad King authored
    All commands accepting file paths should normalize the slashes so that
    the string-represented names can be compared reliably.  The commands
    add_library and add_executable have done this for years.  We taught
    add_custom_command to normalize its OUTPUT names in commit a75a0a14
    (Normalize add_custom_command OUTPUT names, 2010-12-15).  We handled a
    special case of the DEPENDS option in commit 7befc007 (Handle trailing
    slashes on add_custom_command DEPENDS, 2011-01-26).
    
    Teach both add_custom_command and add_custom_target to normalize slashes
    of DEPENDS files up front.  This approach subsumes the above-mentioned
    special case so remove the one line added for it but keep its test.
    Extend the CustomCommand test to check that slash count mismatches
    between custom command OUTPUT and DEPENDS can still be linked correctly.
    12860505