It appears to be the case from a simple test I made:
add_custom_target(B
COMMAND echo B
)
add_custom_command(TARGET B POST_BUILD
COMMAND echo post build start
COMMAND sleep 5
COMMAND echo post build end
)
add_custom_target(A ALL
COMMAND echo A
DEPENDS B)
but I didn't find any offical documentation mentioning this guarantee. Can I rely on it?