I have integrated a tool that generates some code from a text file in CMake based build environment.
This tool is also able to generate the dependency file in the GNU make format (pretty much like gcc -MD
does it for c files).
I would like to include this dependency file in makefiles generated by CMake in order to correctly rebuild when necessary. Unfortunately, I could not find the correct way to do this.
I tried:
- Generated Dependency Files in CMake , but there was no answer
- https://cmake.org/cmake/help/latest/command/add_custom_command.html?highlight=add_custom_command has the
DEPFILE
option but it only works for Ninja
Has anyone had a similar issue?