Skip to content
  • Brad King's avatar
    Makefiles: Restore path consistency in the global dispatch makefile · 5e0b06fe
    Brad King authored
    Directory-level rules in `CMakeFiles/Makefile2` were previously
    previously written by each directory's local generator using its own
    decision for using relative or absolute paths.
    
    Since commit d33b12d8 (Add support for build tree symlink inside
    source tree, 2022-02-25, v3.24.0-rc1~583^2), each local generator
    explicitly models the relationship between its source and build paths,
    and uses this to determine when it is safe to use relative paths.
    Because `add_subdirectory` supports arbitrary placement of the source
    and build directories, different local generators may have different
    relationships between their source and build paths.  This can cause
    disagreement among rules written to `CMakeFiles/Makefile2`.
    
    Restore consistency by always using the root local generator to write
    rules to `CMakeFiles/Makefile2`.  Relative paths should always be
    expressed w.r.t. the top-level build directory since that is the working
    directory in which the `...
    5e0b06fe