From what I understand compilation works something like:
- If the first time compile all files
- else only compile modified files
I’d like to do something similar but instead of compile I’d like to run our companies style checker. I’d like the logic to be similar
- If the first time check all files
- else only check modified files
Is this possible?
I remember doing something like this long ago with classic
makefile patterns, like:
%.stvn : %.cpp myExe $< -o $@
In the beginning there are no .stvn files so it will run
myExe one by one for each .cpp file creating a subsequent .stvn file.
Later if a .cpp is updated it’s found to be newer and so myExe is executed on just the newer file.
So I get and understand and use this in makefiles.
How can I do something similar in Cmake?