doc: extract_content.py: support multiple build directories
Exclude (other) build directories with a CMakeCache.txt file as they
typically contain previous output from ourselves.
One key feature of 'out of source" builds offered by CMake is allowing
multiple build directories. For instance to build different
configurations without starting from scratch. Unfortunately, the
extract_content.py code had a severe issue with multiple build
directories with an interesting effect on build times, see simple
reproduction below:
cd doc/
cmake -B _build/
cmake -B _b2
# Repeat these a couple times
make -C _build content
make -C _b2 content
find -name rst
./_b2/rst
./_b2/rst/doc/_build/rst
./_b2/rst/doc/_build/rst/doc/_b2/rst
./_b2/rst/doc/_build/rst/doc/_b2/rst/doc/_build/rst
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 file changed