Usage of ctest_empty_binary_directory

We have our own CTest script runner.
In that, I’m not sure how best to use ctest_empty_binary_directory, and its interplay with ctest_start.

The bin folder seems to be created in ctest_start; so it seems that ctest_empty_binary_directory should be called before it?
The problem is, I only want to empty the directory in case the build actually runs; meaning that for “Continuous” mode, it should only empty the bin folder if there were any updates; but if I do the emptying after the update step, then the configure step complains about a missing bin directory.
If I do the update before the ctest_start, it complains that ctest_start has to be called before ctest_update.
How is this handled in the “default” script? (i.e. whatever runs the dashboard mode when no user script is given; Is that default script available as a cmake script somewhere maybe so that I could look it up how it’s handled there?) Is the emptying of the bin folder even triggered there under some conditions?
(EDIT: does share\cmake-CMAKE_VERSION\Templates\CTestScript.cmake.in get used somehow? - there CTEST_EMPTY_BINARY_DIRECTORY is commented out?)

It feels like there’s some other mechanism going on here that it matters whether the build is going to run or not. Is there another use case being layered on top of this?

FWIW, ctest_start will set up <builddir>/Testing/Temporary/TAG or some such. ctest_update expects to reuse the metadata written there. Therefore, ctest_empty_binary_directory needs to be before ctest_start.