What have you tried so far? Did you read the documentation of the BYPRODUCTS and DEPENDS keyword of add_custom_command ?
The concept is just too complicated to even start trying
I mean, I have used add_custom_command(OUTPUT ... ... DEPENDS) in other context, but I do not know how to apply this to the dilemma of “using something (which has not been generated) in CMake Configuration”
I think the above is not possible, because during CMake Configuration (#2), the file timer_cx.d has not been generated yet, thus the content of timer_cx.d cannot be known
Even if timer_cx.d can be generated during CMake generation (before “make all”), is it still possible?