If target A depends on B, are B's POST_BUILD commands guaranteed to be executed before A starting to build?

16 views Asked by At

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?

0

There are 0 answers