> Well at first glance it seemed to work, but in fact it is
> not : A is still built before B, and fails to build missing
> B.h.
>
> Please note that this only occurs on visual studio.
Try to set B.h source file properties as GENERATED and include it into
A_SRCS. Maybe this help. Could you provide your CMakeLists.txt?