I'm trying to create a CMake script that will 'bind' so to speak "my custom command" action to every compile command.
Example scenario
I have 3 sources:
source1.c
source2.c
main.c
This is what I expect to happen:
"my custom command" -> compile: source1.c ->
"my custom command" -> compile: source2.c ->
"my custom command" -> compile: main.c
I want this custom command to be executed only if particular object file needs rebuilding.
It would be nice if I could also pass compiled 'source path' as an argument to "my custom command" using generated expressions somehow.
Is it possible?